[lldb-dev] Acceptance of dwarf2/3 suggested form of DW_AT_comp_dir

Greg Clayton gclayton at apple.com
Thu Aug 21 10:10:19 PDT 2014


On Aug 21, 2014, at 4:23 AM, Matthew Gardiner <mg11 at csr.com> wrote:
> 
> Apologies for me getting noisy on this thread.
> 
> However, I don't think it's possible to work around toolchains that adopt the DWARF2/3 suggested form. The problem occurs if lldb wants to support debugging ELFs produced on different hosts - i.e. if the producer and consumers of the DWARF are either POSIX/Windows. We could then have a situation where a comp_dir string is something like:
> 
> c:/home/source

Actually I think you will be ok because it will be:

c:\home\source  for windows...

> 
> in this case, we cannot determine whether c is a drive-letter or a hostname.
> 
> (So, I think we'll be changing our toolchain accordingly :-)
> 
> However, if anyone has any opinions on this DWARF2/3 debate I'd be interested in hearing them.

Feel free to modify the DWARF parser to strip off the leading hostname to get things fixed and working. If it is part of the older _or_ current spec, we should support it in LLDB.

Greg



More information about the lldb-dev mailing list