aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2024-06-28 00:30:49 +0100
committerMark Harmstone <mark@harmstone.com>2024-07-13 21:53:18 +0100
commitf53087a719d97959304d57b647cc8792061a9db3 (patch)
treee9cb46bbebc8df498f8db1cf6f9c4822337ad253
parent131fcb5a3820e44fa80e3b9c2abdecda98007776 (diff)
downloadgcc-f53087a719d97959304d57b647cc8792061a9db3.zip
gcc-f53087a719d97959304d57b647cc8792061a9db3.tar.gz
gcc-f53087a719d97959304d57b647cc8792061a9db3.tar.bz2
Add CodeView enum cv_sym_type
Make everything more gdb-friendly by using an enum for symbol constants rather than #defines. gcc/ * dwarf2codeview.cc (S_LDATA32, S_GDATA32, S_COMPILE3): Undefine. (enum cv_sym_type): Define. (struct codeview_symbol): Use enum cv_sym_type. (write_codeview_symbols): Add default to switch.
-rw-r--r--gcc/dwarf2codeview.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/dwarf2codeview.cc b/gcc/dwarf2codeview.cc
index 5155aa7..921d5f4 100644
--- a/gcc/dwarf2codeview.cc
+++ b/gcc/dwarf2codeview.cc
@@ -46,10 +46,6 @@ along with GCC; see the file COPYING3. If not see
#define CHKSUM_TYPE_MD5 1
-#define S_LDATA32 0x110c
-#define S_GDATA32 0x110d
-#define S_COMPILE3 0x113c
-
#define CV_CFL_80386 0x03
#define CV_CFL_X64 0xD0
@@ -70,6 +66,14 @@ along with GCC; see the file COPYING3. If not see
#define HASH_SIZE 16
+/* This is enum SYM_ENUM_e in Microsoft's cvinfo.h. */
+
+enum cv_sym_type {
+ S_LDATA32 = 0x110c,
+ S_GDATA32 = 0x110d,
+ S_COMPILE3 = 0x113c
+};
+
/* This is enum LEAF_ENUM_e in Microsoft's cvinfo.h. */
enum cv_leaf_type {
@@ -168,7 +172,7 @@ struct codeview_function
struct codeview_symbol
{
codeview_symbol *next;
- uint16_t kind;
+ enum cv_sym_type kind;
union
{
@@ -983,6 +987,8 @@ write_codeview_symbols (void)
case S_GDATA32:
write_data_symbol (sym);
break;
+ default:
+ break;
}
free (sym);