On Wed, May 15, 2013 at 1:24 PM, Malea, Daniel <[email protected]>wrote:

> Hey Mike, looks good, but any reason to not put this implementation in
> ObjectFileELF (or re-use that class if possible)? I notice that
> ELFHeader::Parse() (see ELFHeader.cpp:108) seems to read some similar
> fields as your function below.  If we can improve the ObjectFile plugin and
> re-use it instead of replicating its functionality, I think that would be
> preferable.
>
> OTOH, if it is not possible to initialize an ObjectFile at the point where
> the CPU type is needed, or that is otherwise undesirable, I'm OK with
> having some minimal ELF functionality in the Linux host plugin.
>

On Wed, May 15, 2013 at 2:03 PM, Greg Clayton <[email protected]> wrote:

> The correct fix for this is to fill in the GetModuleSpecifications() in
> ObjectFileELF:
>

I had looked at the ObjectFileELF class, but it seemed a bit heavyweight
for just getting the file architecture (2 bytes in the elf header). When
someone does a "platform process list" this can get called on just about
every process the user is running. It looks like calling
ObjectFile::GetModuleSpecifications() reads 512 bytes of the file and then
tries to callback all the ObjectFile plug-ins until a match is found.

I'll implement the ObjectFileELF::GetModuleSpecifications() and see how
that looks though.

Thanks.
 -Mike
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to