<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 16, 2024 at 1:05 PM Martin via Dwarf-discuss <<a href="mailto:dwarf-discuss@lists.dwarfstd.org">dwarf-discuss@lists.dwarfstd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 16/05/2024 21:58, Martin via Dwarf-discuss wrote:<br>
<br>
> <br>
> If there is code (with debug info) that uses a class/struct that is <br>
> defined in a unit with debug info (or at least a base class is in such a <br>
<br>
Tiny but important mistake..., it meant to write<br>
<br>
  uses a class/struct that is defined in a unit *WITHOUT* debug info<br>
<br>
<br>
> unit), then IMHO the debugger should be able to show the entire <br>
> structure, including fields/methods from that unit without debug info. <br>
> (because only the type is in the other unit, but the variable itself is <br>
> in a unit with debug info).<br>
> <br>
> For that, the declaration of that class can be repeated. But if the user <br>
> then wants to call (from the debugger) a function on that (base-) class, <br>
> then it needs the DW_AT_low_pc?<br></blockquote><div><br>Oh, perhaps the easier thing is to address this question directly.<br><br>I believe this is done with existing producers and consumers by having the DW_AT_linkage_name attached to the function declaration. Hmm, just tried with GDB and even if I omit the linkage name, it's able to call the function - I guess by using the DWARF it has, and searching the mangled names of the symbols, it can demangle them and match them up (or create a mangled name from the DWARF to match that up - though that might fail in some cases where the DWARF doesn't have enough info to produce the matching mangled name) and it knows the return type and can decode the bits to render them correctly.<br><br>So, there's a couple of options at least.<br><br>- Dave<br><br> </div></div></div>