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

Matthew Gardiner mg11 at csr.com
Thu Aug 21 22:39:45 PDT 2014


Greg Clayton wrote:
> 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...

Ok, that's a pretty easy check to make first (i.e. single letter, :, 
then back-slash). Presumably if a windows toolchain uses / instead of \ 
then it's badly broken.

Adding zturner, if he should care to comment on the windows path.

>
>> 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.

No problem. I'll massage my current local change, to include the windows 
path check, then get it submitted.

thanks
Matt



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.



More information about the lldb-dev mailing list