aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf/dwarf2enums.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/dwarf/dwarf2enums.h')
-rw-r--r--src/common/dwarf/dwarf2enums.h73
1 files changed, 69 insertions, 4 deletions
diff --git a/src/common/dwarf/dwarf2enums.h b/src/common/dwarf/dwarf2enums.h
index 4316a89c..777d9bfc 100644
--- a/src/common/dwarf/dwarf2enums.h
+++ b/src/common/dwarf/dwarf2enums.h
@@ -1,6 +1,6 @@
// -*- mode: c++ -*-
-// Copyright (c) 2010 Google Inc. All Rights Reserved.
+// Copyright 2010 Google LLC
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -12,7 +12,7 @@
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
-// * Neither the name of Google Inc. nor the names of its
+// * Neither the name of Google LLC nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
@@ -31,7 +31,7 @@
#ifndef COMMON_DWARF_DWARF2ENUMS_H__
#define COMMON_DWARF_DWARF2ENUMS_H__
-namespace dwarf2reader {
+namespace google_breakpad {
// These enums do not follow the google3 style only because they are
// known universally (specs, other implementations) by the names in
@@ -95,6 +95,10 @@ enum DwarfTag {
DW_TAG_unspecified_type = 0x3b,
DW_TAG_partial_unit = 0x3c,
DW_TAG_imported_unit = 0x3d,
+ // DWARF 4.
+ DW_TAG_type_unit = 0x41,
+ // DWARF 5.
+ DW_TAG_skeleton_unit = 0x4a,
// SGI/MIPS Extensions.
DW_TAG_MIPS_loop = 0x4081,
// HP extensions. See:
@@ -115,6 +119,16 @@ enum DwarfTag {
DW_TAG_PGI_interface_block = 0xA020
};
+enum DwarfUnitHeader {
+ DW_UT_compile = 0x01,
+ DW_UT_type = 0x02,
+ DW_UT_partial = 0x03,
+ DW_UT_skeleton = 0x04,
+ DW_UT_split_compile = 0x05,
+ DW_UT_split_type = 0x06,
+ DW_UT_lo_user = 0x80,
+ DW_UT_hi_user = 0xFF
+};
enum DwarfHasChild {
DW_children_no = 0,
@@ -149,7 +163,33 @@ enum DwarfForm {
DW_FORM_sec_offset = 0x17,
DW_FORM_exprloc = 0x18,
DW_FORM_flag_present = 0x19,
+
+ // Added in DWARF 5:
+ DW_FORM_strx = 0x1a,
+ DW_FORM_addrx = 0x1b,
+ DW_FORM_ref_sup4 = 0x1c,
+ DW_FORM_strp_sup = 0x1d,
+ DW_FORM_data16 = 0x1e,
+ DW_FORM_line_strp = 0x1f,
+
+ // DWARF 4, but value out of order.
DW_FORM_ref_sig8 = 0x20,
+
+ // Added in DWARF 5:
+ DW_FORM_implicit_const = 0x21,
+ DW_FORM_loclistx = 0x22,
+ DW_FORM_rnglistx = 0x23,
+ DW_FORM_ref_sup8 = 0x24,
+ DW_FORM_strx1 = 0x25,
+ DW_FORM_strx2 = 0x26,
+ DW_FORM_strx3 = 0x27,
+ DW_FORM_strx4 = 0x28,
+
+ DW_FORM_addrx1 = 0x29,
+ DW_FORM_addrx2 = 0x2a,
+ DW_FORM_addrx3 = 0x2b,
+ DW_FORM_addrx4 = 0x2c,
+
// Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFission.
DW_FORM_GNU_addr_index = 0x1f01,
DW_FORM_GNU_str_index = 0x1f02
@@ -234,6 +274,11 @@ enum DwarfAttribute {
DW_AT_call_line = 0x59,
// DWARF 4
DW_AT_linkage_name = 0x6e,
+ // DWARF 5
+ DW_AT_str_offsets_base = 0x72,
+ DW_AT_addr_base = 0x73,
+ DW_AT_rnglists_base = 0x74,
+ DW_AT_dwo_name = 0x76,
// SGI/MIPS extensions.
DW_AT_MIPS_fde = 0x2001,
DW_AT_MIPS_loop_begin = 0x2002,
@@ -286,6 +331,26 @@ enum DwarfAttribute {
DW_AT_PGI_lstride = 0x3a02
};
+// .debug_rngslist entry types
+enum DwarfRngListEntry {
+ DW_RLE_end_of_list = 0,
+ DW_RLE_base_addressx = 1,
+ DW_RLE_startx_endx = 2,
+ DW_RLE_startx_length = 3,
+ DW_RLE_offset_pair = 4,
+ DW_RLE_base_address = 5,
+ DW_RLE_start_end = 6,
+ DW_RLE_start_length = 7,
+};
+
+// Line number content type codes (DWARF 5).
+enum DwarfLineNumberContentType {
+ DW_LNCT_path = 1,
+ DW_LNCT_directory_index = 2,
+ DW_LNCT_timestamp = 3,
+ DW_LNCT_size = 4,
+ DW_LNCT_MD5 = 5,
+};
// Line number opcodes.
enum DwarfLineNumberOps {
@@ -675,5 +740,5 @@ enum DwarfPointerEncoding
DW_EH_PE_indirect = 0x80
};
-} // namespace dwarf2reader
+} // namespace google_breakpad
#endif // COMMON_DWARF_DWARF2ENUMS_H__