This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: using gdb as runtime library


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]