This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Question, does gdb have a command can show the file and line info of a address like "addr2line"
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 8 Feb 2012 14:00:30 +0100
- Subject: Re: Question, does gdb have a command can show the file and line info of a address like "addr2line"
- References: <CANFwon28LGr-1aQvXGuW=+vWnvKAj2QhQZz_cpWAdtC1-8g-+Q@mail.gmail.com>
On Wed, 08 Feb 2012 13:57:03 +0100, Hui Zhu wrote:
> GDB can get the symbol info with command "info symbol 0x400570".
> Does gdb have a command can show the file and line info of a address
> like "addr2line"?
(gdb) info line *0x454d40
Line 27 of "../../gdb/gdb.c" starts at address 0x454d40 <main> and ends at 0x454d45 <main+5>.
Regards,
Jan