llvm-project/lldb/source/Plugins/Process/elf-core
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
Makefile elf-core: Strip trailing whitespace 2014-04-17 13:06:49 +00:00
ProcessElfCore.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
ProcessElfCore.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
RegisterContextPOSIXCore_arm.cpp Limit scope of RegisterContextPOSIX.h header 2015-09-14 13:16:59 +00:00
RegisterContextPOSIXCore_arm.h Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. 2015-10-19 18:52:10 +00:00
RegisterContextPOSIXCore_arm64.cpp Limit scope of RegisterContextPOSIX.h header 2015-09-14 13:16:59 +00:00
RegisterContextPOSIXCore_arm64.h Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. 2015-10-19 18:52:10 +00:00
RegisterContextPOSIXCore_mips64.cpp Limit scope of RegisterContextPOSIX.h header 2015-09-14 13:16:59 +00:00
RegisterContextPOSIXCore_mips64.h Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. 2015-10-19 18:52:10 +00:00
RegisterContextPOSIXCore_powerpc.cpp Limit scope of RegisterContextPOSIX.h header 2015-09-14 13:16:59 +00:00
RegisterContextPOSIXCore_powerpc.h Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. 2015-10-19 18:52:10 +00:00
RegisterContextPOSIXCore_x86_64.cpp Limit scope of RegisterContextPOSIX.h header 2015-09-14 13:16:59 +00:00
RegisterContextPOSIXCore_x86_64.h Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. 2015-10-19 18:52:10 +00:00
ThreadElfCore.cpp Report original thread ID for FreeBSD core files 2015-07-31 14:24:32 +00:00
ThreadElfCore.h Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. 2015-10-19 18:52:10 +00:00