This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to store function-name and its return values while program runs
- From: Gaius Mulley <gaius at glam dot ac dot uk>
- To: Sandeep222 <sandeep dot srikumar at honeywell dot com>
- Cc: gdb at sourceware dot org
- Date: 21 Nov 2008 11:01:04 +0000
- Subject: Re: How to store function-name and its return values while program runs
- References: <20618721.post@talk.nabble.com>
Sandeep222 <sandeep.srikumar@honeywell.com> writes:
> As we proceed with debugging a program, if I need to know the order of
> functions being executed by printing on screen along with their return
> values when a 'run' command or 'next' command is executed, how can i
> proceed? I went thru frame.c but all the function seem to execute only when
> a command is executed in the gdb. Plz help.
> Reg,
> Sandeep
set a breakpoint at each of the functions of interest.
(gdb) break function1
(gdb) break function2
etc
now run the program
(gdb) run
when gdb hits a breakpoint you can finish the function and
print the result via:
(gdb) fin
regards,
Gaius