This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How can I define the breakpoint-commands in my gdbinit file
- From: Eli Zaretskii <eliz at gnu dot org>
- To: "Luo Yi" <firingme at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 14 Dec 2006 06:27:27 +0200
- Subject: Re: How can I define the breakpoint-commands in my gdbinit file
- References: <77d8667c0612131751v2913b5d3l31f5d14fd94cdf40@mail.gmail.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.