aboutsummaryrefslogtreecommitdiff
path: root/gdb/block.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-10-02 17:38:05 +0200
committerTom de Vries <tdevries@suse.de>2021-10-02 17:38:05 +0200
commitb625c7701d700d2a11cc1704a23bb79847251f01 (patch)
tree3aa26137da9f475b90144d309a21c816c2e7ac9a /gdb/block.c
parent1e9983e73052d78e6c9fb709ddb897d26fef664c (diff)
downloadfsf-binutils-gdb-b625c7701d700d2a11cc1704a23bb79847251f01.zip
fsf-binutils-gdb-b625c7701d700d2a11cc1704a23bb79847251f01.tar.gz
fsf-binutils-gdb-b625c7701d700d2a11cc1704a23bb79847251f01.tar.bz2
[gdb/symtab] Remove COMPUNIT_CALL_SITE_HTAB
Remove macro COMPUNIT_CALL_SITE_HTAB, and provide access to the htab using member functions: - compunit_symtab::find_call_site - compunit_symtab::set_call_site_htab Tested on x86_64-linux. Co-Authored-By: Tom de Vries <tdevries@suse.de>
Diffstat (limited to 'gdb/block.c')
-rw-r--r--gdb/block.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/block.c b/gdb/block.c
index 4cb9573..90c0c5b 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -225,15 +225,15 @@ struct call_site *
call_site_for_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct compunit_symtab *cust;
- void **slot = NULL;
+ call_site *cs = nullptr;
/* -1 as tail call PC can be already after the compilation unit range. */
cust = find_pc_compunit_symtab (pc - 1);
- if (cust != NULL && COMPUNIT_CALL_SITE_HTAB (cust) != NULL)
- slot = htab_find_slot (COMPUNIT_CALL_SITE_HTAB (cust), &pc, NO_INSERT);
+ if (cust != nullptr)
+ cs = cust->find_call_site (pc);
- if (slot == NULL)
+ if (cs == nullptr)
{
struct bound_minimal_symbol msym = lookup_minimal_symbol_by_pc (pc);
@@ -247,7 +247,7 @@ call_site_for_pc (struct gdbarch *gdbarch, CORE_ADDR pc)
: msym.minsym->print_name ()));
}
- return (struct call_site *) *slot;
+ return cs;
}
/* Return the blockvector immediately containing the innermost lexical block