[lldb-dev] Cross-arch core file loading on FreeBSD
Ed Maste
emaste at freebsd.org
Fri Feb 13 14:24:18 PST 2015
On 13 February 2015 at 16:37, Greg Clayton <gclayton at apple.com> wrote:
> So does this mean you think you can find something in memory to help identify the actual architecture?
Indeed - the CPU architecture is set in the ELF header, so that's
fine. And there are notes that uniquely identify the file as a FreeBSD
core file, including the OS version (in struct prstatus):
Notes at offset 0x00000190 with length 0x00001b38:
Owner Data size Description
FreeBSD 0x00000078 NT_PRPSINFO (prpsinfo structure)
FreeBSD 0x00000140 NT_PRSTATUS (prstatus structure)
...
The only awkward part is the header and note parsing in ObjectFileELF,
which is a bit of a mess at the moment.
More information about the lldb-dev
mailing list