From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: Doug Evans <dje@google.com>, gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [patch+doc 1/2] filename-display: 1->4 options {inferior,libs}{,-sepdebug}
Date: Thu, 07 Mar 2013 15:07:00 -0000 [thread overview]
Message-ID: <20130307150745.GA12995@host2.jankratochvil.net> (raw)
In-Reply-To: <513897C7.1060709@redhat.com>
On Thu, 07 Mar 2013 14:36:07 +0100, Pedro Alves wrote:
> The set of system paths is defined by the OS
> integrator, so seemed closer to being bounded to me.
> The user can well put files wherever it wants.
[...]
> Irrespective of glass half empty vs half full, I guess the first
> question is whether by-path is a better approach than by
> have-sep-debug. It _feels_ more to the point, therefore better to
> me, but I'm not really trying to impose it or block the other
> approach. I wonder what others think.
[...]
> Using sepdebug for system/non-system also feels like will always
> have corner cases, though.
It complex to configure - it will need setting it by distros (from gdb.spec
and similar files) and after all it is also not foolproof, people install
their own binaries to /usr/bin and one may ask how should those be displayed.
The primary problem is that making the setup non-trivial is IMO not worth it
as the "relative" setting does not work correctly anyway. It should be IMO
relative to the package build directory but in reality it is:
* either "absolute" anyway if package always calls: gcc $PWD/parser/file.c
* or "basename" if package always calls: cd parser; gcc file.c
* or what is expected as relative if package calls: gcc parser/file.c
(BTW sure one can always detect the full $PWD/parser/file.c path by looking
also at DW_AT_comp_dir but that is not what "relative" does.)
So if some complex solution should be done one should first fix the "relative"
behavior so that it makes sense (=introduce a 4th new option). I hope
everyone agrees the correct behavior is to display source filesnames relative
to the unpacked package base source directory.
If we already get configured distro-configurable system directories I have an
idea - strip all common directories of all the source files but excluding
source files which come from the distro-configurable system directories. This
is where I failed with the common directories stripping draft patch before as
one gets included files like
/builddir/build/BUILD/glibc-2.15-a316c1f/malloc/mcheck-init.c:
[patch FYI not for commit] Attempt to properly relativize executable's filenames
http://sourceware.org/ml/gdb-patches/2013-02/msg00412.html
Message-ID: <20130215195801.GA18966@host2.jankratochvil.net>
It goes all a bit more far than I planned but OK, when you ask for it.
Thanks,
Jan
prev parent reply other threads:[~2013-03-07 15:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 20:25 Jan Kratochvil
2013-02-16 8:33 ` Eli Zaretskii
2013-02-18 14:33 ` Jan Kratochvil
2013-02-18 16:27 ` Eli Zaretskii
2013-02-27 19:38 ` Jan Kratochvil
2013-02-27 19:50 ` Doug Evans
2013-02-27 20:06 ` Jan Kratochvil
2013-03-06 19:54 ` Doug Evans
2013-03-07 9:52 ` Jan Kratochvil
2013-03-07 10:26 ` Pedro Alves
2013-03-07 12:01 ` Jan Kratochvil
2013-03-07 10:30 ` Pedro Alves
2013-03-07 12:04 ` Jan Kratochvil
2013-03-07 13:36 ` Pedro Alves
2013-03-07 15:07 ` Jan Kratochvil [this message]
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=20130307150745.GA12995@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/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