[lldb-dev] Loadable Code Segment Information & SectionType in LLDB

Abhishek Aggarwal via lldb-dev lldb-dev at lists.llvm.org
Tue Aug 9 09:01:03 PDT 2016


Hello all

I have following 2 queries:

1. Can SB APIs of LLDB provide information regarding the loadable *Code
Segment* (r-xp part of /proc/$PID/maps file in case of Linux) of a debugged
process? The information I am looking for is start address and end address
of the loadable code segment of the debugged process. I know that SBModule
class can provide all the *Sections* of the object file via SBSection
class. However, I couldn't find any API in this class that can provide the
information I need.

2. SBSection::GetSectionType() API returns an enum 'SectionType'. Does
SectionType represent the section types as specified by different object
file formats (Mach-O, PECOFF, ELF)?

As an example, ELF specification specifies section types like SHT_NULL,
SHT_PROGBITS, SHT_RELA, SHT_HASH, SHT_NOTE, SHT_NOBITS etc. However,
SectionType enum doesn't contain all these types. Hence, enum SectionType
is either a mix of all section types of different object file formats or it
is a custom type of LLDB. I will appreciate any comment on this.


Thanks
Abhishek Aggarwal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160809/f77d801d/attachment.html>


More information about the lldb-dev mailing list