aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-30 10:25:40 -0600
committerTom Tromey <tom@tromey.com>2024-01-28 10:58:15 -0700
commit9423d61e97fa10a5880719d194f326fe27da5e4f (patch)
treed37d177ea5201fd422cdb83b9ef4a643d4771e8c
parent48f7f3751eac0bb5a2cf8c4d52cbf477e81bef14 (diff)
downloadfsf-binutils-gdb-9423d61e97fa10a5880719d194f326fe27da5e4f.zip
fsf-binutils-gdb-9423d61e97fa10a5880719d194f326fe27da5e4f.tar.gz
fsf-binutils-gdb-9423d61e97fa10a5880719d194f326fe27da5e4f.tar.bz2
Small cleanup in DWARF reader
I noticed a couple of spots in dwarf/read.c:new_symbol that call add_symbol_to_list. However, this function is generally written to set list_to_add, and then have a single call to add_symbol_to_list at the end. This patch cleans up this discrepancy. Note that new_symbol is overlong and should probably be split up.
-rw-r--r--gdb/dwarf2/read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 55a1735..4ac8f34 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -18870,7 +18870,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
sym->set_aclass_index (LOC_OPTIMIZED_OUT);
sym->set_type (builtin_type (objfile)->builtin_core_addr);
sym->set_domain (LABEL_DOMAIN);
- add_symbol_to_list (sym, cu->list_in_scope);
+ list_to_add = cu->list_in_scope;
break;
case DW_TAG_entry_point:
/* SYMBOL_BLOCK_VALUE (sym) will be filled in later by
@@ -19209,7 +19209,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
case DW_TAG_common_block:
sym->set_aclass_index (LOC_COMMON_BLOCK);
sym->set_domain (COMMON_BLOCK_DOMAIN);
- add_symbol_to_list (sym, cu->list_in_scope);
+ list_to_add = cu->list_in_scope;
break;
default:
/* Not a tag we recognize. Hopefully we aren't processing