diff options
Diffstat (limited to 'gdb/dwarf2/read-debug-names.h')
-rw-r--r-- | gdb/dwarf2/read-debug-names.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/gdb/dwarf2/read-debug-names.h b/gdb/dwarf2/read-debug-names.h index e616cf8..3abbc03 100644 --- a/gdb/dwarf2/read-debug-names.h +++ b/gdb/dwarf2/read-debug-names.h @@ -1,6 +1,6 @@ /* Reading code for .debug_names - Copyright (C) 2023-2024 Free Software Foundation, Inc. + Copyright (C) 2023-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -17,16 +17,39 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DWARF2_READ_DEBUG_NAMES_H -#define DWARF2_READ_DEBUG_NAMES_H +#ifndef GDB_DWARF2_READ_DEBUG_NAMES_H +#define GDB_DWARF2_READ_DEBUG_NAMES_H struct dwarf2_per_objfile; -extern const gdb_byte dwarf5_augmentation[8]; +/* DWARF-5 augmentation strings. + + They must have a size that is a multiple of 4. + + "GDB" is the old, no-longer-supported GDB augmentation. + + The "GDB2" augmentation string specifies the use of the DW_IDX_GNU_* + attributes. + + The meaning of the "GDB3" augmentation string is identical to "GDB2", except + for the meaning of DW_IDX_parent. With "GDB2", DW_IDX_parent represented an + index in the name table. With "GDB3", it represents an offset into the entry + pool. */ + +constexpr gdb_byte dwarf5_augmentation_1[4] = { 'G', 'D', 'B', 0 }; +static_assert (sizeof (dwarf5_augmentation_1) % 4 == 0); + +constexpr gdb_byte dwarf5_augmentation_2[8] + = { 'G', 'D', 'B', '2', 0, 0, 0, 0 }; +static_assert (sizeof (dwarf5_augmentation_2) % 4 == 0); + +constexpr gdb_byte dwarf5_augmentation_3[8] + = { 'G', 'D', 'B', '3', 0, 0, 0, 0 }; +static_assert (sizeof (dwarf5_augmentation_3) % 4 == 0); /* Read .debug_names. If everything went ok, initialize the "quick" elements of all the CUs and return true. Otherwise, return false. */ bool dwarf2_read_debug_names (dwarf2_per_objfile *per_objfile); -#endif /* DWARF2_READ_DEBUG_NAMES_H */ +#endif /* GDB_DWARF2_READ_DEBUG_NAMES_H */ |