[lldb-dev] PATCH for REVIEW: Implement Linux Host::FindProcesses()
Michael Sartain
mikesart at valvesoftware.com
Wed May 15 14:33:49 PDT 2013
On Wed, May 15, 2013 at 1:24 PM, Malea, Daniel <daniel.malea at intel.com>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 <gclayton at apple.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130515/1595513f/attachment.html>
More information about the lldb-dev
mailing list