diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2024-07-16 23:52:02 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2024-08-12 10:31:09 -0400 |
commit | 4144d36a68bda0f20c02e6a4444052b44a462155 (patch) | |
tree | 35f30b63534a727ff1ce4cb2d7e3f406f0ced154 /gdb/compile | |
parent | 8d2f4b7c3168f79fdef3e50163c91cca43da1381 (diff) | |
download | gdb-4144d36a68bda0f20c02e6a4444052b44a462155.zip gdb-4144d36a68bda0f20c02e6a4444052b44a462155.tar.gz gdb-4144d36a68bda0f20c02e6a4444052b44a462155.tar.bz2 |
gdb: add program_space parameter to lookup_minimal_symbol
>From what I can see, lookup_minimal_symbol doesn't have any dependencies
on the global current state other than the single reference to
current_program_space. Add a program_space parameter and make that
current_program_space reference bubble up one level.
Change-Id: I759415e2f9c74c9627a2fe05bd44eb4147eee6fe
Reviewed-by: Keith Seitz <keiths@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/compile')
-rw-r--r-- | gdb/compile/compile-c-symbols.c | 6 | ||||
-rw-r--r-- | gdb/compile/compile-cplus-symbols.c | 3 | ||||
-rw-r--r-- | gdb/compile/compile-object-load.c | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index e2af722..7a38d3a 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -355,7 +355,8 @@ gcc_convert_symbol (void *datum, } else if (request == GCC_C_ORACLE_SYMBOL) { - bound_minimal_symbol bmsym = lookup_minimal_symbol (identifier); + bound_minimal_symbol bmsym + = lookup_minimal_symbol (current_program_space, identifier); if (bmsym.minsym != NULL) { convert_symbol_bmsym (context, bmsym); @@ -410,7 +411,8 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context, } else { - bound_minimal_symbol msym = lookup_minimal_symbol (identifier); + bound_minimal_symbol msym + = lookup_minimal_symbol (current_program_space, identifier); if (msym.minsym != NULL) { if (compile_debug) diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c index 7e251a6..6c482e7 100644 --- a/gdb/compile/compile-cplus-symbols.c +++ b/gdb/compile/compile-cplus-symbols.c @@ -453,7 +453,8 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context, } else { - bound_minimal_symbol msym = lookup_minimal_symbol (identifier); + bound_minimal_symbol msym + = lookup_minimal_symbol (current_program_space, identifier); if (msym.minsym != nullptr) { if (compile_debug) diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c index cb69086..df48b1c 100644 --- a/gdb/compile/compile-object-load.c +++ b/gdb/compile/compile-object-load.c @@ -764,7 +764,8 @@ compile_object_load (const compile_file_names &file_names, continue; } - bound_minimal_symbol bmsym = lookup_minimal_symbol (sym->name); + bound_minimal_symbol bmsym + = lookup_minimal_symbol (current_program_space, sym->name); switch (bmsym.minsym == NULL ? mst_unknown : bmsym.minsym->type ()) { |