[patch gdb]: Fix some DOS-path related issues in gdb
Jan Kratochvil
jan.kratochvil@redhat.com
Mon Mar 7 19:28:00 GMT 2011
On Thu, 03 Mar 2011 16:32:19 +0100, Pedro Alves wrote:
> On Thursday 03 March 2011 14:58:32, Joel Brobecker wrote:
> > These would still be pertinent in the case of cross debugging, no?
> > If the files were cross-compiled on Windows, the debug info would
> > contain file paths that follow the Windows convention...
>
> And then if you try to debug that on GNU/Linux, things still
> won't work, because filename_cmp changes behavior depending on host,
> not target or context. That's why I believe there should be a clear
> distinction between what's a source path, and a host path. I think
> Kai's bfd changes affect host paths, so they're fine. (haven't really
> checked, but that's what I imagine). For source paths, I'd rather
> have this patch resurected...
>
> <http://sourceware.org/ml/gdb-patches/2010-12/msg00343.html>
debug info is not transferable between hosts. As it (in most cases) contains
absolute filenames it cannot be transferred even between two unices.
For this purpose Fedora (+other distros different tools) provides
/usr/lib/rpm/debugedit for .debug filenames editing into a generalized form.
Any patches of GDB for target-specific filenames are not on the right place as
other utilities (such as binutils `objdump -dS' etc.) still remain broken.
As the post-link editing has a performance hit there may be some filename
adjustments provided in the producer (gcc) but IMO not in all the consumers.
As /usr/lib/rpm/debugedit (compilable as a general non-rpm utility) has some
limitations (as it does in-place filenames overwriting) with recent elfutils
support for DWARF reading+writing such a utility should be simple I hope.
So the host-only scope of this patchset I find right. This is not a review of
its contents, just a statement on its scope.
Thanks,
Jan
More information about the Gdb-patches
mailing list