On Fri, 14 Nov 2014 14:34:19 +0100
Mathieu Malaterre <ma...@debian.org> wrote:

> While reading the wiki page for AutomaticDebugPackages, I was
> wondering if it is possible to post-processed object file to
> manipulate relatives path for debug info ?
> 
> Typical use case is that after installing the -dbg package, you end up
> with a gdb backtrace saying:
> 
> [...]
> brw_meta_fast_clear (brw=brw@entry=0x7fffd4097a08,
> fb=fb@entry=0x7fffd40fa900, buffers=buffers@entry=2,
> partial_clear=partial_clear@entry=false)
>     at 
> ../../../../../../../src/mesa/drivers/dri/i965/brw_meta_fast_clear.c:447
> 447 ../../../../../../../src/mesa/drivers/dri/i965/brw_meta_fast_clear.c:
> No such file or directory.
> [...]
> 
> Unless you create a fake directory tree, it is tedious to get any
> sense of the above.
> 
> Sometimes you even get a hardcoded "/buildd" toplevel path, which may
> be annoying to create just to get proper context (function name,
> instruction...) for reporting a bug.
> 
> So my questions are:
> 1. Is it possible to post-processed those objects file and change
> relative path to full path
> 2. Is it possible to reserve a system path for debug information, eg
> all debug paths should start with "/usr/src/debug"

Isn't there just a gdb user configuration option to set the paths into
which you want gdb to look for these paths? source packages do not
unpack to /usr/src (that sounds like an rpm-ism), so these paths are
entirely arbitrary. This isn't about the debug symbols (which are in a
standard system path /usr/lib/debug/) - this is about the particular
copy of the source code to look up those symbols and apt-get source
will put that wherever you want it. You then need to tell gdb where to
find the .c files.

So your second question is invalid. The "debug information" could mean
two things - the debug symbols which are in a standard path and the
source code which is not. This also means that there is no point in
pre-processing - gdb can do it on a per-user (per project?) basis. (I
just can't remember the syntax offhand).



-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpmSqLV1821X.pgp
Description: OpenPGP digital signature

Reply via email to