This is the mail archive of the gdb-prs@sourceware.org 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]

gdb/2540: GDB needs a --sysroot command line option


>Number:         2540
>Category:       gdb
>Synopsis:       GDB needs a --sysroot command line option
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 21 22:08:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     psmith@gnu.org
>Release:        gdb-6.8
>Organization:
>Environment:
--host=i686-pc-linux-gnu --target=powerpc-linux-gnu
>Description:
Most of the GCC suite now takes a --sysroot command line argument specifying where to look for the system headers, libraries, etc.  GDB has a new "set sysroot" command which does the same thing, and that's very handy.  However, GDB really needs this to be available as a command-line option as well.

The problem is that if I run "gdb <targ> <core>" it will try to read the various libraries, etc. before I get any command-line prompt, and it will of course fail because the ones it finds are not the right sysroot ones.  Only after I get a long list of error messages do I get a prompt and the ability to "set sysroot ..." whereupon GDB can now find the right libraries etc.

Even if I try something like "gdb -ex 'set sysroot ...' <targ> <core>" it won't help, because GDB will internalize the executable and core before running the set sysroot command.

What I would really like is a --sysroot=... option to GDB, just like I have for GCC.  In this case GDB can see that option and process it first, before it tries to read in the exec file or the core file.  This will keep everything loading in the right order and avoid lots of warnings and error messages.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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