public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* .gdbini file
@ 2012-08-11  7:30 Smith John
  2012-08-11  8:40 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Smith John @ 2012-08-11  7:30 UTC (permalink / raw)
  To: gdb

hi:

          I am debugging  gdb  with  itself ,  how can I use  the
gdbinit  file  in the  gdb  source directory?  or  what  role  does
this file  play  on ?


thanks!

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

* Re: .gdbini file
  2012-08-11  7:30 .gdbini file Smith John
@ 2012-08-11  8:40 ` Eli Zaretskii
  2012-08-15 17:35   ` Doug Evans
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2012-08-11  8:40 UTC (permalink / raw)
  To: Smith John; +Cc: gdb

> Date: Sat, 11 Aug 2012 15:30:23 +0800
> From: Smith John <horserivers@gmail.com>
> 
>           I am debugging  gdb  with  itself ,  how can I use  the
> gdbinit  file  in the  gdb  source directory?

Either type the "source /path/to/.gdbinit" command at the GDB prompt,
or start GDB from the directory of that file, so that it is loaded
automatically.

> or what role does this file play on ?

It defines several defaults and commands useful for debugging GDB.
It's a text file, so you can read it and see what it does.

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

* Re: .gdbini file
  2012-08-11  8:40 ` Eli Zaretskii
@ 2012-08-15 17:35   ` Doug Evans
  2012-08-15 18:09     ` Terekhov, Mikhail
  2012-08-15 18:22     ` Tom Tromey
  0 siblings, 2 replies; 6+ messages in thread
From: Doug Evans @ 2012-08-15 17:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Smith John, gdb

On Sat, Aug 11, 2012 at 1:40 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sat, 11 Aug 2012 15:30:23 +0800
>> From: Smith John <horserivers@gmail.com>
>>
>>           I am debugging  gdb  with  itself ,  how can I use  the
>> gdbinit  file  in the  gdb  source directory?
>
> Either type the "source /path/to/.gdbinit" command at the GDB prompt,
> or start GDB from the directory of that file, so that it is loaded
> automatically.
>
>> or what role does this file play on ?
>
> It defines several defaults and commands useful for debugging GDB.
> It's a text file, so you can read it and see what it does.

Remember that .gdbinit is gone, in favor of gdb-gdb.gdb [there's a
reason it's spelled that way :-)]
And there should be no need to manually load it, that should happen
automatically (except when debugging a newer gdb with an older gdb).

For reference sake,
- gdb-gdb.gdb is installed in the build tree from gdb-gdb.gdb.in in
the source tree
- there is also gdb-gdb.py, which provides additional Python based
support for debugging gdb with gdb.

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

* RE: .gdbini file
  2012-08-15 17:35   ` Doug Evans
@ 2012-08-15 18:09     ` Terekhov, Mikhail
  2012-08-15 19:32       ` dje
  2012-08-15 18:22     ` Tom Tromey
  1 sibling, 1 reply; 6+ messages in thread
From: Terekhov, Mikhail @ 2012-08-15 18:09 UTC (permalink / raw)
  To: gdb

> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On
> Behalf Of Doug Evans
> Sent: Wednesday, August 15, 2012 1:35 PM
...
> 
> Remember that .gdbinit is gone, in favor of gdb-gdb.gdb [there's a
> reason it's spelled that way :-)]

And the reason is?

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

* Re: .gdbini file
  2012-08-15 17:35   ` Doug Evans
  2012-08-15 18:09     ` Terekhov, Mikhail
@ 2012-08-15 18:22     ` Tom Tromey
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2012-08-15 18:22 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb

Doug> Remember that .gdbinit is gone, in favor of gdb-gdb.gdb [there's a
Doug> reason it's spelled that way :-)]

Buck Rogers.

Tom

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

* RE: .gdbini file
  2012-08-15 18:09     ` Terekhov, Mikhail
@ 2012-08-15 19:32       ` dje
  0 siblings, 0 replies; 6+ messages in thread
From: dje @ 2012-08-15 19:32 UTC (permalink / raw)
  To: Terekhov, Mikhail; +Cc: gdb

Terekhov, Mikhail writes:
 > > -----Original Message-----
 > > From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On
 > > Behalf Of Doug Evans
 > > Sent: Wednesday, August 15, 2012 1:35 PM
 > ...
 > > 
 > > Remember that .gdbinit is gone, in favor of gdb-gdb.gdb [there's a
 > > reason it's spelled that way :-)]
 > 
 > And the reason is?

gdb-gdb.gdb
 ^   ^   ^
 ^   ^   ^---- It's a gdb script.
 ^   ^         If it were Python this would be .py.
 ^   ^
 ^   ^-------- "-gdb" is a gdb convention, it's the suffix added to a file
 ^             for auxiliary support.
 ^             E.g., gdb will auto-load libstdc++.so-gdb.py (version elided)
 ^             which contains the std c++ pretty-printers.
 ^
 ^------------ This init script is for the program named "gdb".
               If this were for readelf the script would be named
               readelf-gdb.gdb.

Kind of a funny name, but there is a convention behind it. :-)

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

end of thread, other threads:[~2012-08-15 19:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-11  7:30 .gdbini file Smith John
2012-08-11  8:40 ` Eli Zaretskii
2012-08-15 17:35   ` Doug Evans
2012-08-15 18:09     ` Terekhov, Mikhail
2012-08-15 19:32       ` dje
2012-08-15 18:22     ` Tom Tromey

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).