HomePhabricator

Add/fix support for i386 elf core files

Authored by dvlahovski on Jul 29 2016, 6:18 AM.

Description

Add/fix support for i386 elf core files

Summary:
There were places in the code, assuming(hardcoding) offsets
and types that were only valid for the x86_64 elf core file format.

The NT_PRSTATUS and NT_PRPSINFO structures are with the 64 bit layout.
I have reused them and parse i386 files manually, and fill them in the
same struct.

Also added some error handling during parsing that checks if the
available bytes in the buffer are enough to fill the structures.

The i386 core file test case now passes.

For reference on the structures layout, I generally used the
source of binutils (bfd, readelf)

Bug: https://llvm.org/bugs/show_bug.cgi?id=26947

Reviewers: labath

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D22917

llvm-svn: 277140

Details

Committed
dvlahovskiJul 29 2016, 6:18 AM
Differential Revision
D22917: Add/fix support for i386 elf core files
Parents
rGe768c4b858bd: Rewrite gdb-remote's SendContinuePacketAndWaitForResponse
Branches
Unknown
Tags
Unknown