Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] Some fixes for debug files and sysroots
@ 2019-01-23  1:04 John Baldwin
  2019-01-23  1:04 ` [PATCH 1/2] Look for separate debug files in debug directories under a sysroot John Baldwin
  2019-01-23  1:04 ` [PATCH 2/2] Trim trailing directory separators from new sysroots John Baldwin
  0 siblings, 2 replies; 9+ messages in thread
From: John Baldwin @ 2019-01-23  1:04 UTC (permalink / raw)
  To: gdb-patches

When working on non-x86 architectures, I often install a base system
to a sysroot directory that I then use to generate a filesystem for
use with qemu using a tool like makefs.  Since this sysroot is a full
system install, it also contains a nested global debugfile directory
for base system libraries and binaries (e.g.
/sysroot/usr/lib/debug/bin/ls.debug for /sysroot/bin/ls).  GDB's
current logic for handling separate debug files does not look for
debug files in debug directories under a sysroot.  These two patches
seek to make this work seamlessly (my current workaround is to go
create a symlink from /usr/lib/debug/sysroot to /sysroot/usr/lib/debug
on the host and these patches remove the need for that).

The first patch augments the existing logic to add another path check
for <sysroot>/<debug_dir>/<debugfile>.  The second patch is a
convenience to deal with tab completion of directories passed to 'set
sysroot' usually adding a trailing / that then breaks the logic for
separate debug files.  Rather than trying to cope with a possible
trailing separator in find_separate_debug_file, I instead chose to
"fix" the sysroot to when it is set to remove the trailing /.  One
downside of this is that it doesn't fix a static sysroot set at build
time with --sysroot.

John Baldwin (2):
  Look for separate debug files in debug directories under a sysroot.
  Trim trailing directory separators from new sysroots.

 gdb/ChangeLog | 10 ++++++++++
 gdb/solib.c   |  8 ++++++++
 gdb/symfile.c | 19 +++++++++++++++++++
 3 files changed, 37 insertions(+)

-- 
2.19.2


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

end of thread, other threads:[~2019-02-22 20:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23  1:04 [PATCH 0/2] Some fixes for debug files and sysroots John Baldwin
2019-01-23  1:04 ` [PATCH 1/2] Look for separate debug files in debug directories under a sysroot John Baldwin
2019-01-26  5:17   ` Simon Marchi
2019-01-26 17:12     ` Simon Marchi
2019-01-28 18:53       ` John Baldwin
2019-02-22 20:51         ` Simon Marchi
2019-01-23  1:04 ` [PATCH 2/2] Trim trailing directory separators from new sysroots John Baldwin
2019-01-26 19:10   ` Simon Marchi
2019-01-28 20:41     ` John Baldwin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox