public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: How do you use GDB to debug GDB
@ 2001-03-21 15:59 Michael Elizabeth Chastain
  2001-03-21 15:59 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Michael Elizabeth Chastain @ 2001-03-21 15:59 UTC (permalink / raw)
  To: gdb, ischis2

Hello Stephen,

This is how I do it:

  % gdb powerpc-motorola-elf-gdb
  (gdb) set prompt [top] 
  [top] set args --command=C:/rti/bin/rtidbug.ini C:/examples/dll/main.exe
  [top] break help_command
  [top] run

The first command helps me keep track of which gdb I'm in.  There is
a space at the end of the command: "set prompt [top] ".

The second command tells the superior gdb what the arguments are for
the inferior gdb.  This is the heart of what you want.  Note that you
can re-run the inferior gdb and the arguments will repeat.

The third line sets a convenient breakpoint in the superior gdb so that
you can bounce back up to it.  I usually do "help foo" instead of "help"
for getting to the superior gdb, to reduce the screen output.

The fourth line starts the inferior gdb with the arguments given on the
second line.

I've done this on both Unix/Linux and Cygwin gdb's.

Cheers,

Michael Elizabeth Chastain
<chastain@redhat.com>
"love without fear"

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: How do you use GDB to debug GDB
@ 2001-03-21 15:59 Michael Elizabeth Chastain
  2001-03-21 15:59 ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Elizabeth Chastain @ 2001-03-21 15:59 UTC (permalink / raw)
  To: chastain, eliz; +Cc: gdb, ischis2

Eli Zaretskii writes:

> I think this is important enough to go into the manual.

I'm up for writing a manual section on "debugging gdb with gdb".
It's a good task for my Sunday Project.

I just added a yellow sticky to my monitor to that effect.

Michael

^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: How do you use GDB to debug GDB
@ 2001-03-21 15:59 Michael Elizabeth Chastain
  2001-03-21 15:59 ` Eli Zaretskii
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Elizabeth Chastain @ 2001-03-21 15:59 UTC (permalink / raw)
  To: chastain, eliz; +Cc: gdb, ischis2

Hi Eli,

> Note that there's already such a section in gdbint.texinfo (but it 
> doesn't tell much).

Okay, I see it.  I'll be expanding that section.

> I just asked if somebody knew of any reason not to 
> move that into gdb.texinfo.

Mmmm, that is a separate issue.

gdbint.texinfo is the right file for people who are working on gdb.
Someone running gdb on another copy of gdb is working on gdb.
So I'm in favor of leaving this section in gdbint.texinfo.

Michael

^ permalink raw reply	[flat|nested] 21+ messages in thread
* How do you use GDB to debug GDB
@ 2001-03-21 15:59 Stephen Smith
  2001-03-21 15:59 ` J.T. Conklin
  2001-03-21 15:59 ` Fernando Nasser
  0 siblings, 2 replies; 21+ messages in thread
From: Stephen Smith @ 2001-03-21 15:59 UTC (permalink / raw)
  To: GDB

I have a gdb debugger configured to for a remote target (host i686-pc-cygwin target=powerpc-motorola-elf).  normally I
run gdb as:

     powerpc-motorola-elf-gdb --command=C:/rti/bin/rtidbug.ini C:/examples/dll/main.exe

Now I want to run the gdb against the above process.  Since I am running this in a Windows NT command shell I can't use
    gdb   /usr/local/bin/powerpc-motorola-elf-gdb  some_process_id

Can someone help

sps




^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2001-03-21 15:59 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-21 15:59 How do you use GDB to debug GDB Michael Elizabeth Chastain
2001-03-21 15:59 ` Eli Zaretskii
2001-03-21 15:59   ` Kevin Buettner
2001-03-21 15:59   ` Andrew Cagney
2001-03-21 15:59     ` Merging manuals (was Re: How do you use GDB to debug GDB) Stan Shebs
2001-03-21 15:59       ` J.T. Conklin
2001-03-21 15:59         ` Michael Meissner
2001-03-21 15:59         ` Eli Zaretskii
2001-03-21 15:59       ` Eli Zaretskii
2001-03-21 15:59     ` How do you use GDB to debug GDB Eli Zaretskii
2001-03-21 15:59 ` Stephen Smith
2001-03-21 15:59 ` Stephen Smith
  -- strict thread matches above, loose matches on Subject: below --
2001-03-21 15:59 Michael Elizabeth Chastain
2001-03-21 15:59 ` Eli Zaretskii
2001-03-21 15:59 Michael Elizabeth Chastain
2001-03-21 15:59 ` Eli Zaretskii
2001-03-21 15:59 Stephen Smith
2001-03-21 15:59 ` J.T. Conklin
2001-03-21 15:59 ` Fernando Nasser
2001-03-21 15:59   ` Frank Ch. Eigler
2001-03-21 15:59     ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).