This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [Question] does GDB have a commands to get the end address of a function?
On Mon, Jun 11, 2012 at 2:36 AM, Hui Zhu <teawater@gmail.com> wrote:
> Now, I get the end address of a function with command "disassemble
> function_name".
> Does GDB have an command to output the end address of a function?
i'm not aware of anything, there is the following which could be made
into a user defined command or something.
py gdb.execute("p/x %s" %
gdb.block_for_pc(gdb.decode_line("*main")[1][0].pc).end)
seems to differ slightly from 'disassemble' I suppose by the length of
the last instruction