Hello Todd, > They use DW_AT_address_class with a CUDA-specific enum of address spaces, > with > values for things like: global memory, shared memory, const memory, etc. They > don't attach these attributes to subroutines, because all the code on that > architecture is in a single "code" memory. They do attach them to pointer > types, as the DWARF spec describes. They also attach them to variables, > formals, etc. That's a vendor extension (which I'd forgotten until I looked > it > up again in the DWARF spec). But an obvious one. We might want to formalize > it > at some point. > > Anyway, these are the sorts of things we see: > > DW_TAG_pointer_type > DW_AT_type : ... > DW_AT_address_class : ptxGenericStorage > > DW_TAG_variable > DW_AT_name : myConstant > DW_AT_type : ... > DW_AT_location : ... > DW_AT_address_class : ptxConstStorage > > DW_TAG_variable > DW_AT_abstract_origin : ... > DW_AT_location : ... > DW_AT_address_class : ptxLocalStorage > > I don't know your architecture, but I'd expect something similar to work for > any > GPU with heterogeneous memories.
That looks good to me. And I agree that it would be very nice if the extension to attach this attribute to variables were formalized. Thanks, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Gary Kershaw Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928 _______________________________________________ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org