Bug 12857 - Output of "info line variable" needs improvement
Summary: Output of "info line variable" needs improvement
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 20:21 UTC by dje
Modified: 2011-06-08 15:17 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dje 2011-06-07 20:21:10 UTC
play$ cat info-line-var.c
int foo;
int main () { return 0; }
play$ gcc -g info-line-var.c
play$ gdb a.out
(gdb) info line foo
Line 1 of "info-line-var.c" is at address 0x4004c4 <main> but contains no code.


The line number and file name are correct,
but the address is wrong, and printing "but contains no code"
is kinda lame.
Comment 1 Andreas Schwab 2011-06-08 08:12:11 UTC
Why do you think the address is wrong?

(gdb) help info line
Core addresses of the code for a source line.
Comment 2 dje 2011-06-08 15:17:42 UTC
Ok, let's first establish whether it is legit to pass a variable name to "info line".