using gdb as runtime library

Andrew Cagney ac131313@cygnus.com
Wed Mar 21 15:59:00 GMT 2001


"J.T. Conklin" wrote:
> 
> >>>>> "Edward" == Edward Peschko <edwardp@excitehome.net> writes:
> Edward> Is there a 'libgdb.a'? Alternatively, how do you set a
> Edward> 'trigger' on a certain line of an application, so that a gdb
> Edward> command is run at a certain point in a file, without stopping
> Edward> execution of the program?
> 
> You set a breakpoint on that line, and then the set of commands to be
> run when the breakpoint is set.  If the last command is "continue",
> execution will pick up where it left off.

And if the first command is ``silent'':

	(gdb) b main
	Breakpoint 1 at 0x8048822: file twofloats.c, line 19.
	(gdb) commands 1
	Type commands for when breakpoint 1 is hit, one per line.
	End with a line saying just "end".
	>silent
	>list
	>continue
	>end
	(gdb) run

the ``breakpoint'' message is supressed.

	Andrew



More information about the Gdb mailing list