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
_______________________________________________
Dwarf-Discuss mailing list
Dwarf-Discuss@lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org

Reply via email to