llvm-project/lldb/source
Ed Maste d13f691f41 Improve FreeBSD kernel debugging
FreeBSD kernel modules are actually relocatable (.o) ELF files and this
previously caused some issues for LLDB. This change addresses these when
using lldb to symbolicate FreeBSD kernel backtraces. 

The major problems:

- Relocations were not being applied to the DWARF debug info despite
  there being code to do this. Several issues prevented it from working:

  - Relocations are computed at the same time as the symbol table, but
    in the case of split debug files, symbol table parsing always
    redirects to the primary object file, meaning that relocations would
    never be applied in the debug file.

  - There's actually no guarantee that the symbol table has been parsed
    yet when trying to parse debug information.

  - When actually applying relocations, it will segfault because the
    object files are not mapped with MAP_PRIVATE and PROT_WRITE.

- LLDB returned invalid results when performing ordinary address-to-
  symbol resolution. It turned out that the addresses specified in the
  section headers were all 0, so LLDB believed all the sections had
  overlapping "file addresses" and would sometimes return a symbol from
  the wrong section.

Patch by Brian Koropoff

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

llvm-svn: 314672
2017-10-02 14:35:07 +00:00
..
API Revert patch r313904, as it breaks "command source" and in 2017-09-28 01:39:07 +00:00
Breakpoint Wire up the breakpoint name help string. 2017-09-15 00:52:35 +00:00
Commands Revert patch r313904, as it breaks "command source" and in 2017-09-28 01:39:07 +00:00
Core Improve FreeBSD kernel debugging 2017-10-02 14:35:07 +00:00
DataFormatters Use exact equality for category language matching, for all languages, except those specifically mentioned. 2017-06-06 20:40:24 +00:00
Expression Add support for the DWP debug info format 2017-08-25 13:56:14 +00:00
Host Signal polling is supported with pselect (re-land r313704 without a Windows breakage) 2017-09-20 06:56:46 +00:00
Initialization Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Interpreter Revert patch r313904, as it breaks "command source" and in 2017-09-28 01:39:07 +00:00
Plugins Improve FreeBSD kernel debugging 2017-10-02 14:35:07 +00:00
Symbol Improve FreeBSD kernel debugging 2017-10-02 14:35:07 +00:00
Target [Expression parser] Setting to enable use of ExternalASTMerger 2017-09-28 20:20:25 +00:00
Utility Use ThreadLauncher to launch TaskPool threads 2017-09-19 15:38:30 +00:00
CMakeLists.txt Remove Plugins/Process/POSIX from include_directories 2017-04-11 12:26:25 +00:00
lldb.cpp One more cleanup to lldb version printing 2016-11-14 22:43:08 +00:00