[LLDB] OpenBSD support
authorKamil Rytarowski <n54@gmx.com>
Sun, 26 Mar 2017 15:34:57 +0000 (15:34 +0000)
committerKamil Rytarowski <n54@gmx.com>
Sun, 26 Mar 2017 15:34:57 +0000 (15:34 +0000)
commit12801f1e0f2f505ecf0a172341a6eccb2f930b28
tree625a9714d14f81aff640be060ee6a4005dc787f0
parent8096a8c86ff03213f43ed3cda182ae3005c3cdf7
[LLDB] OpenBSD support

Summary:
Add basic OpenBSD support. This is enough to be able to analyze core dumps for OpenBSD/amd64, OpenBSD/arm, OpenBSD/arm64 and OpenBSD/i386.

Note that part of the changes to source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp fix a bug that probably affects other platforms as well.  The GetProgramHeaderByIndex() interface use 1-based indices, but in some case when looping over the headers the, the loop starts at 0 and misses the last header.  This caused problems on OpenBSD since OpenBSD core dumps have the PT_NOTE segment as the last program header.

Reviewers: joerg, labath, krytarowski

Reviewed By: krytarowski

Subscribers: aemerson, emaste, rengolin, srhines, krytarowski, mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 298810
25 files changed:
lldb/include/lldb/Host/Config.h
lldb/include/lldb/Host/Editline.h
lldb/include/lldb/Host/Host.h
lldb/include/lldb/Host/HostInfo.h
lldb/include/lldb/Host/openbsd/Config.h [new file with mode: 0644]
lldb/include/lldb/Host/openbsd/HostInfoOpenBSD.h [new file with mode: 0644]
lldb/source/API/SystemInitializerFull.cpp
lldb/source/CMakeLists.txt
lldb/source/Host/CMakeLists.txt
lldb/source/Host/common/Host.cpp
lldb/source/Host/openbsd/Host.cpp [new file with mode: 0644]
lldb/source/Host/openbsd/HostInfoOpenBSD.cpp [new file with mode: 0644]
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/Platform/CMakeLists.txt
lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/source/Plugins/Platform/OpenBSD/CMakeLists.txt [new file with mode: 0644]
lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp [new file with mode: 0644]
lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h [new file with mode: 0644]
lldb/source/Plugins/Process/Utility/CMakeLists.txt
lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.cpp [new file with mode: 0644]
lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_i386.h [new file with mode: 0644]
lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.cpp [new file with mode: 0644]
lldb/source/Plugins/Process/Utility/RegisterContextOpenBSD_x86_64.h [new file with mode: 0644]
lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp