From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/2] Some fixes for debug files and sysroots
Date: Wed, 23 Jan 2019 01:04:00 -0000 [thread overview]
Message-ID: <cover.1548205042.git.jhb@FreeBSD.org> (raw)
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
next reply other threads:[~2019-01-23 1:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 1:04 John Baldwin [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1548205042.git.jhb@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox