This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Query
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: Query
- From: "Daniel Berlin" <dan at cgsoftware dot com>
- Date: Fri, 28 Jan 2000 08:29:12 EST
- Cc: sharathibm at theglobe dot com, gdb at sourceware dot cygnus dot com
- Reply-To: dan at cgsoftware dot com
Actually, there is a much better way.
set targetdebug 1
(before running/loading a file).
>
>On Jan 27, 10:36pm, Sharath Kumar wrote:
>
>> How do i find the control flow of commands used in gdb(for eg.
>> commands like breakpoint, backtrace, disassemble..etc)? Is there a
>> way i can use gdb itself to find the flow?
>
>Sure. You can use gdb to debug itself.
>
>If you want to learn about how breakpoints are set, just set a
>breakpoint on break_command() in breakpoint.c. If you want to
>learn about backtrace, set a breakpoint on backtrace_command in
>stack.c, etc. Once you hit one of these breakpoints, use gdb
>in the same fashion as you would to learn about the control flow
>in any other program.
>
>Kevin
>
>--
>Kevin Buettner
>kev@primenet.com, kevinb@redhat.com