[lldb-dev] Questions from a Linux user

Greg Clayton gclayton at apple.com
Wed Jun 9 15:40:17 PDT 2010


On Jun 9, 2010, at 1:44 PM, Jason Molenda wrote:

> 
> On Jun 9, 2010, at 11:11 AM, Greg Clayton wrote:
> 
>> 3 - Modify the DWARF plug-in to be able to find the DWARF in an ELF file.
>> MacOSX uses different section names for the DWARF "__debug_info" instead
>> of ".debug_info", "__debug_abbrev" instead of ".debug_abbrev", etc.
> 
> We're going to need to create a target OS plugin class that provides information like this soon.  If we #ifdef it we'll be adding impediments to lldb doing cross-host debugging, e.g. debugging a Linux process from a Mac OS X box.

I wasn't suggesting #ifdef'ing anything, I was suggesting looking for a section named "__debug_info" and if not found, then look for ".debug_info" all from within the DWARF parsing plug-in. 


Jim Ingham and I discussed how we wanted to fix this properly. I think adding enumerations for common sections that one might want to extract from an object file would be a good idea:

typedef enum CommonSectionType
{
  eCommonSectionTEXT,
  eCommonSectionDATA,
  eCommonSectionBSS,
  eCommonSectionDWARFDebugInfo,
  eCommonSectionDWARFDebugAbbrev,
	...
};

Then we have a way for the section list or the object file to return the section for by this enumeration. This will abtract us from the various file formats and their section naming quirks.

Greg Clayton





More information about the lldb-dev mailing list