This is the mail archive of the
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: <firstname.lastname@example.org>
Sandeep222 <email@example.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.
set a breakpoint at each of the functions of interest.
(gdb) break function1
(gdb) break function2
now run the program
when gdb hits a breakpoint you can finish the function and
print the result via: