[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: relative path in -dbg packages



For reference.

On Fri, Nov 14, 2014 at 2:34 PM, Mathieu Malaterre <malat@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.

Technically this case is easy (no need for `substitute` keyword), all
'..' gets replaced automatically. So you only need to have a 'src'
directory pointing to mesa-X.Y/src.

Ref:
https://sourceware.org/gdb/onlinedocs/gdb/Source-Path.html

[...]
Plain file names, relative file names with leading directories, file
names containing dots, etc. are all treated as described above; for
instance, if the source path is /mnt/cross, and the source file is
recorded as ../lib/foo.c, gdb would first try ../lib/foo.c, then
/mnt/cross/../lib/foo.c, and after that—/mnt/cross/foo.c.
[...]


Reply to: