This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: GDB 7.5: Problems with the auto-load safe-path feature
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 18 Aug 2012 09:10:49 -0700
- Subject: Re: GDB 7.5: Problems with the auto-load safe-path feature
- References: <83d32ogz3g.fsf@gnu.org>
> This new feature in GDB 7.5 looks like a nuisance in my (short)
> experience.
Same here. Very very much agreed, in fact. But I don't feel we have
much of a leg to stand on, when opposing the feature. Jan and I
discussed this feature quite a bit, as I recall, and came to the best
compromise we could. For your own personal purposes, you can turn
this feature off by default when configuring GDB. I think that
the configure option is: --without-auto-load-safe-path
> 2012-08-18 Eli Zaretskii <eliz@gnu.org>
>
> * auto-load.c (auto_load_objfile_script): If OBJFILE specifies a
> DOS/Windows-style .exe executable program, remove the .exe suffix
> when generating the script file name.
I think that the test should ideally be target-dependent. But short of
that, how about we just try without the .exe prefix if the first attempt
failed, regardless of host and/or target?
In other words:
1. Try loading <filename>-gdb.gdb
2. If (1) fails, and <filename> ends with '.exe':
Try loading <filename-minus-exe>-gdb.gdb
That way, if you are cross-building a Windows GDB on GNU/Linux, and
try to debug it from GNU/Linux as well, the Linux-to-Windows cross GDB
would be able to pickup the gdb-gdb.gdb file automatically.
--
Joel