summaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-27 22:16:41 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-02-06 16:03:47 -0500
commit5f9c5a63ce38b103f778f54394c6a3d43b7ade90 (patch)
treec356fc03c61b9e9234aa8e187fb6c2303b8e5d2c /gdb/symmisc.c
parentf5abd8f234426bbe8ccd08c43e6ae7cbe635e042 (diff)
downloadbinutils-gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.tar.gz
gdb: remove SYMBOL_TYPE macro
Add a getter and a setter for a symbol's type. Remove the corresponding macro and adjust all callers. Change-Id: Ie1a137744c5bfe1df4d4f9ae5541c5299577c8de
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 328230afe3a..160278b50a9 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -523,20 +523,20 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
if (symbol->domain () == STRUCT_DOMAIN)
{
- if (SYMBOL_TYPE (symbol)->name ())
+ if (symbol->type ()->name ())
{
- LA_PRINT_TYPE (SYMBOL_TYPE (symbol), "", outfile, 1, depth,
+ LA_PRINT_TYPE (symbol->type (), "", outfile, 1, depth,
&type_print_raw_options);
}
else
{
fprintf_filtered (outfile, "%s %s = ",
- (SYMBOL_TYPE (symbol)->code () == TYPE_CODE_ENUM
+ (symbol->type ()->code () == TYPE_CODE_ENUM
? "enum"
- : (SYMBOL_TYPE (symbol)->code () == TYPE_CODE_STRUCT
+ : (symbol->type ()->code () == TYPE_CODE_STRUCT
? "struct" : "union")),
symbol->linkage_name ());
- LA_PRINT_TYPE (SYMBOL_TYPE (symbol), "", outfile, 1, depth,
+ LA_PRINT_TYPE (symbol->type (), "", outfile, 1, depth,
&type_print_raw_options);
}
fprintf_filtered (outfile, ";\n");
@@ -545,12 +545,12 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
{
if (symbol->aclass () == LOC_TYPEDEF)
fprintf_filtered (outfile, "typedef ");
- if (SYMBOL_TYPE (symbol))
+ if (symbol->type ())
{
/* Print details of types, except for enums where it's clutter. */
- LA_PRINT_TYPE (SYMBOL_TYPE (symbol), symbol->print_name (),
+ LA_PRINT_TYPE (symbol->type (), symbol->print_name (),
outfile,
- SYMBOL_TYPE (symbol)->code () != TYPE_CODE_ENUM,
+ symbol->type ()->code () != TYPE_CODE_ENUM,
depth,
&type_print_raw_options);
fprintf_filtered (outfile, "; ");
@@ -569,7 +569,7 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
case LOC_CONST_BYTES:
{
unsigned i;
- struct type *type = check_typedef (SYMBOL_TYPE (symbol));
+ struct type *type = check_typedef (symbol->type ());
fprintf_filtered (outfile, "const %s hex bytes:",
pulongest (TYPE_LENGTH (type)));