[Dwarf-Discuss] Retrieving variables, function address using dwarf

Archana Deshmukh desharchana19@gmail.com
Mon Mar 8 09:49:27 GMT 2021


Hello,

I have a pinatrace.out and process map of a file.
With this input, I need to build a symbol table.

Best Regards,
Archana Deshmukh

On Sun, Mar 7, 2021 at 10:29 AM Archana Deshmukh <desharchana19 at gmail.com>
wrote:

>
>
> ---------- Forwarded message ---------
> From: Michael Eager <eager at eagercon.com>
> Date: Sat, Mar 6, 2021 at 10:53 PM
> Subject: Re: [Dwarf-Discuss] Retrieving variables, function address using
> dwarf
> To: Archana Deshmukh <desharchana19 at gmail.com>, <
> dwarf-discuss at lists.dwarfstd.org>
>
>
> On 3/5/21 8:28 PM, Archana Deshmukh via Dwarf-Discuss wrote:
> > I need to read the address of local variable, global variable, function
> > name and function arguments from the process.
> >
> > For global variables , I read the address "55b51afea000" from
> > /proc/<pid>/maps file. I use DW_OP_addr parameter to retrieve the
> address.
> > 55b51afea000 + DW_OP_addr gives me the address of global variable.
> >
> > I need to read the stack segment, heap. Is there any way to read
> > segments? DW_AT_segment parameter seems to be for 16 bit.
> >
> > I need to read the following process map using dwarf.
> >
> > Any suggestion, pointers are welcome.
> >
> > 55b51afea000-55b51afeb000 r-xp 00000000 fd:00 5902563
>
> Can you explain what you are trying to do?
>
> Usually a DWARF consumer (a debugger) does not need to read the
> process memory map.  All of the information you mention is in
> the DWARF data.  You may need to relocate addresses in the DWARF
> debug data.
>
> DWARF does not contain information about the process memory
> layout, such as the location of the heap or the start of the
> stack.
>
> --
> Michael Eager
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/attachments/20210308/ab968342/attachment.html>



More information about the Dwarf-discuss mailing list