aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2024-07-16 23:52:02 -0400
committerSimon Marchi <simon.marchi@efficios.com>2024-08-12 10:31:09 -0400
commit4144d36a68bda0f20c02e6a4444052b44a462155 (patch)
tree35f30b63534a727ff1ce4cb2d7e3f406f0ced154 /gdb/solib-svr4.c
parent8d2f4b7c3168f79fdef3e50163c91cca43da1381 (diff)
downloadfsf-binutils-gdb-4144d36a68bda0f20c02e6a4444052b44a462155.zip
fsf-binutils-gdb-4144d36a68bda0f20c02e6a4444052b44a462155.tar.gz
fsf-binutils-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/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 666e173..1a0e542 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -751,7 +751,7 @@ elf_locate_base (void)
/* This may be a static executable. Look for the symbol
conventionally named _r_debug, as a last resort. */
bound_minimal_symbol msymbol
- = lookup_minimal_symbol ("_r_debug",
+ = lookup_minimal_symbol (current_program_space, "_r_debug",
current_program_space->symfile_object_file);
if (msymbol.minsym != NULL)
return msymbol.value_address ();
@@ -2481,7 +2481,8 @@ enable_break (struct svr4_info *info, int from_tty)
objfile *objf = current_program_space->symfile_object_file;
for (bkpt_namep = solib_break_names; *bkpt_namep != NULL; bkpt_namep++)
{
- bound_minimal_symbol msymbol = lookup_minimal_symbol (*bkpt_namep, objf);
+ bound_minimal_symbol msymbol
+ = lookup_minimal_symbol (current_program_space, *bkpt_namep, objf);
if ((msymbol.minsym != NULL)
&& (msymbol.value_address () != 0))
{
@@ -2501,7 +2502,7 @@ enable_break (struct svr4_info *info, int from_tty)
for (bkpt_namep = bkpt_names; *bkpt_namep != NULL; bkpt_namep++)
{
bound_minimal_symbol msymbol
- = lookup_minimal_symbol (*bkpt_namep, objf);
+ = lookup_minimal_symbol (current_program_space, *bkpt_namep, objf);
if ((msymbol.minsym != NULL)
&& (msymbol.value_address () != 0))
{