How can I define the breakpoint-commands in my gdbinit file

Eli Zaretskii eliz@gnu.org
Thu Dec 14 04:27:00 GMT 2006


> Date: Thu, 14 Dec 2006 09:51:19 +0800
> From: "Luo Yi" <firingme@gmail.com>
> 
> How can I define the breakpoint-commands in my gdbinit file ?
> 
> define b1
> b *0x805d3bf
> commands
> silent
> printf "ne, eax = %x\n", $eax
> end    <<< ------------
> end
> 
> the commands need a end instruction which can't appear in the middle
> of the gdbinit file.

There are bugs in nesting canned commands that are finished by `end'.

I have a local patch to solve at least some of the bugs, but I never
got to apply it because I was requested to show the results of the
test suite after applying the patch, and never had time to install
expect and run the suite.

I could try to dig out that patch, if you want to try it.



More information about the Gdb mailing list