llvm-project/lldb/source
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
..
API Minor cleanup of SBTypeSummary::CreateWithCallback to take an optional description argument 2015-10-27 01:17:28 +00:00
Breakpoint [LLDB] Fix display of value of a vector variables in watchpoint operations 2015-10-09 15:13:20 +00:00
Commands Added support to the expression command for dropping into the REPL at will. 2015-10-20 00:55:21 +00:00
Core Fix build break on OS X from cleanup check-in. 2015-10-28 15:24:19 +00:00
DataFormatters Fix Clang-tidy modernize-use-override warnings in some files in source; other minor fixes. 2015-10-26 17:00:13 +00:00
Expression Fix Clang-tidy modernize-use-override warnings in some files in source; other minor fixes. 2015-10-26 17:00:13 +00:00
Host Fix editline unindentation code for more recent libedits. 2015-10-27 21:53:39 +00:00
Initialization TypeSystem is now a plugin interface and removed any "ClangASTContext &Class::GetClangASTContext()" functions. 2015-09-17 22:23:34 +00:00
Interpreter Fix Clang-tidy modernize-use-override warnings in some files in source; other minor fixes. 2015-10-26 17:00:13 +00:00
Plugins 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
Symbol Introduce the concept of a type that is meaningless without dynamic resolution, which are essentially placeholder types meant to appease a language's type system but do not offer any actual information to the debugger, unless further resolved 2015-10-20 00:13:19 +00:00
Target Revert "Clang module compilation options need to be per-platform." 2015-10-26 21:38:41 +00:00
Utility Add a new task pool class to LLDB 2015-10-20 12:42:05 +00:00
CMakeLists.txt Add initial CMake glue for the NetBSD platform 2015-10-24 00:27:04 +00:00
Makefile [Makefiles] Align library names with CMake build 2015-07-14 20:25:19 +00:00
lldb.cpp Move LLDB initialization/shutdown to Initialization. 2015-03-19 22:00:21 +00:00