This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
user-defined commands and function bounds
- From: Greg Law <greg at greglaw dot net>
- To: gdb at sourceware dot org
- Date: Thu, 15 Jun 2006 09:02:15 +0100
- Subject: user-defined commands and function bounds
Hi list,
I've a couple of questions:
1. Is there any way to get the start and end addresses of a function?
The only way I've found to do it is using the disassemble command, but I
really just want to know where the current function starts and stops?
2. If I have a user-defined command, and one of the commands it executes
fails, it seems that sometimes the command does not complete. e.g.
(gdb) define foo
Type commands for definition of "foo".
End with a line saying just "end".
> echo foo starts\n
> disas
> echo foo ends\n
> end
(gdb) foo
foo starts
No frame selected.
(gdb)
i.e. I don't see the "foo ends" message, because the 'disas' command
failed. Is this intended behaviour, or is it a bug? Is there any way
round it?
Cheers,
Greg