This is the mail archive of the gdb@sourceware.cygnus.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: Query



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

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