This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: Query
- To: "Sharath Kumar" <sharathibm at theglobe dot com>, gdb at sourceware dot cygnus dot com
- Subject: Re: Query
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Fri, 28 Jan 2000 00:03:51 -0700
- References: <KKHDGEJONMMBAAAA@theglobe.com>
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