llvm-project/lldb/source/Plugins/ObjectFile/ELF
Greg Clayton b704b69e0b Make core files not crash when you load a core file into LLDB with just "lldb -c core".
To do this I added a few new ways to determine the OS from PT_NOTE notes in the ELF file:
1 - Look for "LINUX" notes which indicate "linux" should be the OS
2 - Look through the "CORE" notes with NT_FILE as the type and sniff data from the paths listed in this section. On Ubuntu they contain "/lib/x86_64-linux-gnu" which has the triple and allows us to set "linux" as the OS in the architecture returned from ObjectFileELF::GetArchitecture(). 

Setting the OS correctly allows us to get the triple correct so we can extract registers without asserting and killing LLDB.

Also use the data from the NT_FILE to set the main executable if one isn't set in ProcessElfCore::DoLoadCore().
 

llvm-svn: 251537
2015-10-28 18:04:38 +00:00
..
CMakeLists.txt [cmake] Remove LLVM_NO_RTTI. 2015-09-03 08:46:55 +00:00
ELFHeader.cpp Fix build breakage after llvm r240426 2015-06-23 17:15:14 +00:00
ELFHeader.h Fix typos. 2014-07-08 18:05:41 +00:00
Makefile
ObjectFileELF.cpp Make core files not crash when you load a core file into LLDB with just "lldb -c core". 2015-10-28 18:04:38 +00:00
ObjectFileELF.h Make core files not crash when you load a core file into LLDB with just "lldb -c core". 2015-10-28 18:04:38 +00:00