This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

gdbinit.in


When debugging GDB, if I'm looking at a function in corefile.c, it
finds the one in bfd/corefile.c rather than the one in gdb/corefile.c.
This is because, in the .gdbinit that is created in the gdb directory,
the 'dir ./../bfd' command comes later than the 'dir .' command.  This
seems to me to be undesirable behavior; the accompanying patch to
gdbinit.in changes that.

I've moved both 'dir @srcdir@' and 'dir .' to the end of the dir
list.  Certainly I want 'dir @srccdir@' to be towards the end.  I
don't really have a strong opinion about where 'dir .' should be
- honestly, it's not entirely clear to me why it's there at all.
(@srcdir@ is . when I'm configuring this, so I don't see the
difference.)

I didn't worry about running this change through the testsuite, since
it doesn't affect GDB itself and, I assume, it doesn't affect the way 
the testsuite runs.

David Carlton
carlton@math.stanford.edu

2002-07-25  david carlton  <carlton@math.stanford.edu>

	* gdbinit.in: Move dir @srcdir@ and dir . to the end.

Index: gdbinit.in
===================================================================
RCS file: /cvs/src/src/gdb/gdbinit.in,v
retrieving revision 1.1.1.2
diff -c -p -r1.1.1.2 gdbinit.in
*** gdbinit.in	16 Aug 1999 19:52:40 -0000	1.1.1.2
--- gdbinit.in	25 Jul 2002 23:14:58 -0000
*************** commands
*** 10,18 ****
  	return
  end
  
- dir @srcdir@
- dir .
  dir @srcdir@/../mmalloc
  dir @srcdir@/../libiberty
  dir @srcdir@/../bfd
  set prompt (top-gdb) 
--- 10,18 ----
  	return
  end
  
  dir @srcdir@/../mmalloc
  dir @srcdir@/../libiberty
  dir @srcdir@/../bfd
+ dir @srcdir@
+ dir .
  set prompt (top-gdb) 


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