[lldb-dev] get function name from dwarf info

Abid, Hafiz via lldb-dev lldb-dev at lists.llvm.org
Fri Oct 7 07:06:37 PDT 2016



> -----Original Message-----
> From: lldb-dev [mailto:lldb-dev-bounces at lists.llvm.org] On Behalf Of Carlo
> Kok via lldb-dev
> Sent: 07 October 2016 14:29
> To: lldb-dev at lists.llvm.org
> Subject: [lldb-dev] get function name from dwarf info
> 
> Hi,
> 
> I have a piece of debuginfo containing this subfunction :
> 
> DW_TAG_subprogram [6] *
>    DW_AT_low_pc [DW_FORM_addr]   (0x0000000000437020)
>    DW_AT_high_pc [DW_FORM_data4] (0x0000001e)
>    DW_AT_frame_base [DW_FORM_exprloc]    (<0x1> 55 )
>    DW_AT_linkage_name [DW_FORM_strp]     ( .debug_str[0x000000ae] =
> "mi_t11_issudebugtest.ABC2_AA")
>    DW_AT_name [DW_FORM_strp]     ( .debug_str[0x000000cb] = "AA")
>    DW_AT_decl_line [DW_FORM_data1]       (16)
> DW_AT_external [DW_FORM_flag_present] (true)
> 
> 
> It's part (a member) of this type:
> DW_TAG_structure_type [2] *
>    DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000065] =
> "issudebugtest.ABC")
>   DW_AT_byte_size [DW_FORM_data1] (0x08)
> 
> How do I get the dw_at_name field? I don't need lldb to decypher the
> mangling I use, I just want access to the linkage name and real encoded
> name?
> 
> Also how do I get the type this is contained in (presuming there is one
> ofc)?
I am not sure what you are trying to do. Can you elaborate a little.

> 
> Lastly: How do I encode if a method is static or not, I couldn't find
> any difference in what C++ does for instance vs static.

There is  "DW_AT_object_pointer". Debuggers can also make that decision
based on presence of "this" parameter.
 
Regards,
Abid

> 
> --
> Carlo Kok
> RemObjects Software
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev


More information about the lldb-dev mailing list