user-defined commands and function bounds

Greg Law greg@greglaw.net
Thu Jun 15 08:19:00 GMT 2006


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



More information about the Gdb mailing list