aboutsummaryrefslogtreecommitdiff
path: root/gdb/gcore.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/gcore.c
parent8d2f4b7c3168f79fdef3e50163c91cca43da1381 (diff)
downloadgdb-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/gcore.c')
-rw-r--r--gdb/gcore.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 0f04679..969a854 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -269,13 +269,14 @@ call_target_sbrk (int sbrk_arg)
struct value *sbrk_fn, *ret;
bfd_vma tmp;
- if (lookup_minimal_symbol ("sbrk").minsym != nullptr)
+ if (lookup_minimal_symbol (current_program_space, "sbrk").minsym != nullptr)
{
sbrk_fn = find_function_in_inferior ("sbrk", &sbrk_objf);
if (sbrk_fn == NULL)
return (bfd_vma) 0;
}
- else if (lookup_minimal_symbol ("_sbrk").minsym != nullptr)
+ else if (lookup_minimal_symbol (current_program_space, "_sbrk").minsym
+ != nullptr)
{
sbrk_fn = find_function_in_inferior ("_sbrk", &sbrk_objf);
if (sbrk_fn == NULL)