diff options
author | Pedro Alves <palves@redhat.com> | 2014-10-10 15:57:13 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-10-10 15:57:13 +0100 |
commit | 3437254d7b5bc57d3a298df8640ae2f55bdbff2a (patch) | |
tree | a4514be4368be36b4aa93ee54a9833c2361fe8fe /gdb/gdbarch.sh | |
parent | infrun.c:normal_stop: Fix typo in comment (diff) | |
download | binutils-gdb-3437254d7b5bc57d3a298df8640ae2f55bdbff2a.tar.gz binutils-gdb-3437254d7b5bc57d3a298df8640ae2f55bdbff2a.tar.bz2 binutils-gdb-3437254d7b5bc57d3a298df8640ae2f55bdbff2a.zip |
Split vDSO range lookup to a gdbarch hook
We have a case in solib-svr4.c where we could reuse symfile-mem.c's
vDSO range lookup. Since symfile-mem.c is not present in all
configurations solib-svr4.c is, move that lookup to a gdbarch hook.
This has the minor (good) side effect that we stop even trying the
target_auxv_search lookup against targets that don't have a concept of
a vDSO, in case symfile-mem.c happens to be linked in the build
(--enable-targets=all).
Tested on x86_64 Fedora 20.
gdb/
2014-10-10 Pedro Alves <palves@redhat.com>
* arch-utils.c (default_vsyscall_range): New function.
* arch-utils.h (default_vsyscall_range): New declaration.
* gdbarch.sh (vsyscall_range): New hook.
* gdbarch.h, gdbarch.c: Regenerate.
* linux-tdep.c (linux_vsyscall_range): New function.
(linux_init_abi): Install linux_vsyscall_range as
vsyscall_range gdbarch hook.
* memrange.c (address_in_mem_range): New function.
* memrange.h (address_in_mem_range): New declaration.
* symfile-mem.c (find_vdso_size): Delete function.
(add_vsyscall_page): Use gdbarch_vsyscall_range.
Diffstat (limited to 'gdb/gdbarch.sh')
-rwxr-xr-x | gdb/gdbarch.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index c7858875cba..5442799b8cb 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -1030,6 +1030,12 @@ m:int:insn_is_jump:CORE_ADDR addr:addr::default_insn_is_jump::0 # Return -1 if there is insufficient buffer for a whole entry. # Return 1 if an entry was read into *TYPEP and *VALP. M:int:auxv_parse:gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp:readptr, endptr, typep, valp + +# Find the address range of the current inferior's vsyscall/vDSO, and +# write it to *RANGE. If the vsyscall's length can't be determined, a +# range with zero length is returned. Returns true if the vsyscall is +# found, false otherwise. +m:int:vsyscall_range:struct mem_range *range:range::default_vsyscall_range::0 EOF } @@ -1149,6 +1155,7 @@ struct axs_value; struct stap_parse_info; struct ravenscar_arch_ops; struct elf_internal_linux_prpsinfo; +struct mem_range; /* The architecture associated with the inferior through the connection to the target. |