This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB now takes 4 minutes to start up with remote gdbserver target
- From: Gary Benson <gbenson at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Sandra Loosemore <sandra at codesourcery dot com>, Paul_Koning at Dell dot com, gdb at sourceware dot org
- Date: Tue, 28 Jul 2015 16:38:38 +0100
- Subject: Re: GDB now takes 4 minutes to start up with remote gdbserver target
- Authentication-results: sourceware.org; auth=none
- References: <55B1A4FC dot 9010403 at codesourcery dot com> <20150724085244 dot GB22673 at blade dot nx> <55B2444C dot 106 at codesourcery dot com> <2906903F-7478-4B9D-8A9A-A6256F8076EF at dell dot com> <20150724151148 dot GA18553 at blade dot nx> <FC7D3C21-A8E8-4316-8125-E9FCE152F5D0 at dell dot com> <55B26267 dot 4060905 at redhat dot com> <55B27348 dot 1020104 at codesourcery dot com> <20150727121454 dot GA15226 at blade dot nx> <20150728092507 dot GA28545 at blade dot nx>
Gary Benson wrote:
> Ok, here goes...
>
> * From a user's perspective GDB is magically prefixing *some*
> executable and shared library filenames with "target:".
>
> * From a developer's perspective this magic prefixing is implemented
> by having the string "target:" as the default sysroot.
>
> My proposal is to make the default sysroot be "" again, and add the
> prefix in solib_find_1 if certain conditions are met, specifically:
>
> * Executable filenames get prefixed with "target:" iff:
> Automatic "target:" prefixing is enabled
> AND gdb_sysroot is ""
> AND the filesystem is nonlocal
>
> * Shared library filenames get prefixed with "target:" iff:
> Automatic "target:" prefixing is enabled
> AND gdb_sysroot is ""
> AND the filesystem is nonlocal
> AND exec_filename starts with "target:"
>
> There's a new boolean here, "set auto-target-prefix on|off", which
> is enabled by default.
>
> So:
>
> gdb; target remote :9999 -> "target:" prefix applied
> gdb FILE; target remote :9999 -> no "target:" prefix
>
> The latter is how Sandra is invoking GDB. Also:
>
> gdb -n PID, and
> gdb; attach PID -> "target:" prefix applied iff FS is nonlocal
>
> Aside from the fact that this should fix Sandra's use case without
> breaking any I care about, I like that users doing non-remote, non-
> container debugging will not see "target:" prefixes onscreen unless
> they're actually necessary.
I've submitted a series of the work I've done on this:
https://sourceware.org/ml/gdb-patches/2015-07/msg00828.html
Please reply to that thread instead of this.
Thanks,
Gary
--
http://gbenson.net/