aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-10-24 23:00:10 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-10-25 09:06:09 -0400
commitc75e31a1ec593cf7c27ed8acca4fe3e77e2cfc53 (patch)
tree6000ff14c5622bcc300fa0495031c6d9036410f1
parent324956617c35b0e204f54b8da8db2de2bd3b129e (diff)
downloadgdb-c75e31a1ec593cf7c27ed8acca4fe3e77e2cfc53.zip
gdb-c75e31a1ec593cf7c27ed8acca4fe3e77e2cfc53.tar.gz
gdb-c75e31a1ec593cf7c27ed8acca4fe3e77e2cfc53.tar.bz2
gdb: use inferior parameter in add_vsyscall_page
Use the new inferior parameter instead of target_gdbarch. There are still hidden references to the current context behind core_bfd and exec_bfd, but this seemed better than nothing. gdb/ChangeLog: * symfile-mem.c (add_vsyscall_page): Use inferior parameter instead of target_gdbarch. Change-Id: Iaf5ace555ee8e46cbef5190aca1f6fe639f06677
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/symfile-mem.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c1a92bb..2606f87 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
+ * symfile-mem.c (add_vsyscall_page): Use inferior parameter
+ instead of target_gdbarch.
+
+2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
+
* jit.c (jit_reader_load_command): Pass current inferior.
(jit_inferior_init): Change parameter type to inferior, use it.
(jit_inferior_created): Remove.
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c
index 18ab935..62c5664 100644
--- a/gdb/symfile-mem.c
+++ b/gdb/symfile-mem.c
@@ -53,6 +53,7 @@
#include "auxv.h"
#include "elf/common.h"
#include "gdb_bfd.h"
+#include "inferior.h"
/* Verify parameters of target_read_memory_bfd and target_read_memory are
compatible. */
@@ -161,7 +162,7 @@ add_vsyscall_page (inferior *inf)
{
struct mem_range vsyscall_range;
- if (gdbarch_vsyscall_range (target_gdbarch (), &vsyscall_range))
+ if (gdbarch_vsyscall_range (inf->gdbarch, &vsyscall_range))
{
struct bfd *bfd;