[Dwarf-Discuss] DWARF and online-compiled programs (Simon Brand)

Simon Brand simon@codeplay.com
Wed Jun 15 14:01:52 GMT 2016


This approach seems promising; it's probably easier to specify and keeps 
all the necessary information within DWARF. We'd definitely need to 
allow the line table and compile unit information to reference the same 
string so that there's no duplication.

Thanks,

Simon


On 13/06/16 11:22, Pedro Alves wrote:
> On 06/13/2016 09:07 AM, Simon Brand wrote:
>
>> Also, the source might not be "in memory", as it might be placed in a
>> binary segment which is not loaded. The debugger should be interpreting
>> the location as something like the ELF virtual address to locate the
>> source in the object file.
> In that case, wouldn't it be better to instead represent the source
> as another debug string, with DW_FORM_string, or
> .debug_str/DW_FORM_strp, or .debug_str_offsets/DW_FORM_strx, etc. ?
>
> For example, add a new attribute, e.g., DW_AT_source, and in 3.1.1
> where DW_AT_name is described:
>
>   Compilation unit entries may have the following attributes:
>   ...
>   2. A DW_AT_name attribute whose value is a null-terminated string containing
>   the full or relative path name of the primary source file from which the
>   compilation unit was derived.
>
> Change it to say either DW_AT_name or DW_AT_source.  Something like:
>
>   2. Either a DW_AT_name attribute whose value is a null-terminated string
>   containing the full or relative path name of the primary source file from
>   which the compilation unit was derived, or a DW_AT_source attribute whose
>   value is a null-terminated string containing the full contents of the source
>   code from which the compilation unit was derived.
>
> Thanks,
> Pedro Alves
>

-- 
Simon Brand
Staff Software Engineer
Codeplay Software Ltd
Level C, Argyle House, 3 Lady Lawson St, Edinburgh, EH3 9DR
Tel: 0131 466 0503
Fax: 0131 557 6600
Website: http://www.codeplay.com
Twitter: https://twitter.com/codeplaysoft

This email and any attachments may contain confidential and /or privileged information and is for use by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it, or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.
As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.
Company registered in England and Wales, number: 04567874
Registered office: 81 Linkfield Street, Redhill RH1 6BY

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/attachments/20160615/cd188a76/attachment.htm>



More information about the Dwarf-discuss mailing list