Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrey Utkin <autkin@undo.io>
To: John Baldwin <jhb@FreeBSD.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix search of debug files for remote debuggee
Date: Fri, 09 Nov 2018 23:32:00 -0000	[thread overview]
Message-ID: <20181109233210.GA27477@undo-autkin> (raw)
In-Reply-To: <10046787-753c-f7e0-4386-2b50086ae530@FreeBSD.org>

On Fri, Nov 09, 2018 at 11:42:25AM -0800, John Baldwin wrote:
> Now there are debug symbols for the various base OS libraries and binaries
> installed in the sysroot at /ufs/riscv64/rootfs/usr/lib/debug.  For example,
> FreeBSD's libc is installed as /lib/libc.so.7 under the sysroot
> (/ufs/riscv64/lib/libc.so.7) and the debug info is stored at /usr/lib/debug
> under the sysroot (/ufs/riscv64/usr/lib/debug/lib/libc.so.7.debug).  However,
> GDB places the sysroot after the debug prefix and ends up looking for
> /usr/lib/debug/ufs/riscv64/lib/libc.so.7 on the host instead.  I usually
> work around this by creating a symlink from /usr/lib/debug/ufs/riscv64 to
> /ufs/riscv64/usr/lib/debug, but it seems like a bug to me that the we don't
> look for debug files "under" the sysroot.
> 
> I bring this up because I wonder if a more general solution of always putting
> the sysroot before the debug prefix (e.g. "/usr/lib/debug") wouldn't fix
> both your case and mine.  It's not clear to me what the "correct" behavior
> is for mixing sysroot with separate debug files.   It may be that the current
> behavior of <debug dir>/<sysroot>/<object file> is intentional rather than
> the <sysroot>/<debug dir>/<object file> behavior that I would like (and that
> I think your use case also wants).

I see what you mean.

Your intention makes sense, but since GDB does not assume your case out
of the box, I guess

    set debug-file-directory /ufs/riscv64/usr/lib/debug

should just work for you?

From code I see that GDB checks quite a few places for debug files,
maybe some day it would check also where you want.


  reply	other threads:[~2018-11-09 23:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 19:09 Andrey Utkin
2018-11-09 19:42 ` John Baldwin
2018-11-09 23:32   ` Andrey Utkin [this message]
2018-12-24 16:26   ` Simon Marchi
2019-01-02 18:11     ` Andrey Utkin
2019-01-02 19:54       ` Simon Marchi
2018-11-17 18:52 ` Andrey Utkin

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=20181109233210.GA27477@undo-autkin \
    --to=autkin@undo.io \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.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