summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-05-19 20:29:28 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-05-19 20:29:28 +0000
commitbf19a578e602d65d6d6ccc58586c41958a29b184 (patch)
tree8314f6d236a9004d2a7e12aaaf0165bb36205829 /llvm/lib/Support
parentf999547d11249ff13853683d5ca63383593ef4fd (diff)
downloadbcm5719-llvm-bf19a578e602d65d6d6ccc58586c41958a29b184.tar.gz
bcm5719-llvm-bf19a578e602d65d6d6ccc58586c41958a29b184.zip
[DWARF parser] Add basic support for DWZ DWARF multifile extensions.
This change implements basic support for DWARF alternate sections proposal: http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open LLVM tools now understand new forms: DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt, which are used as references to .debug_info and .debug_str sections respectively, stored in a separate file, and possibly shared between different executables / shared objects. llvm-dwarfdump and llvm-symbolizer don't yet know how to access this alternate debug file (usually pointed by .gnu_debugaltlink section), but they can at lease properly parse and dump regular files, which refer to it. This change should fix crashes of llvm-dwarfdump and llvm-symbolizer on files produced by running "dwz" tool. Such files are already installed on some modern Linux distributions. llvm-svn: 237721
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Dwarf.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/Dwarf.cpp b/llvm/lib/Support/Dwarf.cpp
index 95c4bc32701..6229825a8ee 100644
--- a/llvm/lib/Support/Dwarf.cpp
+++ b/llvm/lib/Support/Dwarf.cpp
@@ -233,6 +233,10 @@ const char *llvm::dwarf::FormEncodingString(unsigned Encoding) {
// DWARF5 Fission Extension Forms
case DW_FORM_GNU_addr_index: return "DW_FORM_GNU_addr_index";
case DW_FORM_GNU_str_index: return "DW_FORM_GNU_str_index";
+
+ // Alternate debug sections proposal (output of "dwz" tool).
+ case DW_FORM_GNU_ref_alt: return "DW_FORM_GNU_ref_alt";
+ case DW_FORM_GNU_strp_alt: return "DW_FORM_GNU_strp_alt";
}
return nullptr;
}
OpenPOWER on IntegriCloud