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

Ron Brender ron.brender@gmail.com
Fri Jun 10 15:13:22 GMT 2016


The original proposal extends DW_AT_location in a way that seems not really
in the spirit and intent of that attribute.

Two alternatives come to mind:

1) Invent a new pseudo-device to use in the name string of a standard
DW_AT_name attribute. For the name "inmemory:\\0x55555555", the debugger
would recognize the prefix and decode it's follow-on directly (sort of like
the "file:\\..." URL syntax supported in some browsers). This puts the
burden of agreement on the JIT and its debugger and requires nothing new of
DWARF as such.

2) Add a new implementation-defined attribute DW_AT_in_memory_source whose
class address value is the address in memory of the source string. Use this
attribute as an alternative to DW_AT_name. Since there is no named file
that contains the source, an omitted DW_AT_name (or one with a null string)
is sensible, This also requires nothing new of DWARF.

Something to consider...

Ron

On Thu, Jun 9, 2016 at 2:02 PM, Robinson, Paul <paul.robinson at sony.com>
wrote:

> In principle you could have generated source JIT-compiled on a device that
> has no filesystem in the usual sense, or maybe has one but it isn't
> writable.
>
> Seems like a reasonable approach.
>
> --paulr
>
>
>
> *From:* Dwarf-Discuss [mailto:dwarf-discuss-bounces at lists.dwarfstd.org] *On
> Behalf Of *Bishop, John E
> *Sent:* Thursday, June 09, 2016 10:10 AM
> *To:* dwarf-discuss at lists.dwarfstd.org
> *Subject:* Re: [Dwarf-Discuss] DWARF and online-compiled programs (Simon
> Brand)
>
>
>
> --[ quote ]--
>
> I'm writing this email in particular to address the problem of referencing
> source files in DWARF for online-compiled programs. The issue is that
> programming models such as OpenCL can often have source generated at
> runtime,which is compiled online, with its output not written to file. This
> raises an issue for the compiler: in the generated DWARF, what should it
> put as the file name of the compile unit and associated line table
> information?
>
> --[ end quote ]?
>
>
>
> I?m inclined to say that in the general case the compiler should create an
> actual file and use it, but I like the in-the-binary solution for short
> pseudo-sources.
>
>
>
> This would go into V6, right?
>
>
>
>
>
> _______________________________________________
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
> http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/attachments/20160610/9fef8884/attachment.htm>



More information about the Dwarf-discuss mailing list