aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2014-10-10 15:57:14 +0100
committerPedro Alves <palves@redhat.com>2014-10-10 16:36:38 +0100
commitcdfa0b0ac16739350360b29b05223655d3b9b740 (patch)
treea46e564037ce1cf56385b658db9d010b105121b8 /opcodes
parent8b9a549d3a9176f92b4cac5b388eb473919f80e6 (diff)
downloadgdb-cdfa0b0ac16739350360b29b05223655d3b9b740.zip
gdb-cdfa0b0ac16739350360b29b05223655d3b9b740.tar.gz
gdb-cdfa0b0ac16739350360b29b05223655d3b9b740.tar.bz2
Cache the vsyscall/vDSO range per-inferior
We're now doing a vsyscall/vDSO address range lookup whenever we fetch shared libraries, either through an explicit "info shared", or when the target reports new libraries have been loaded, in order to filter out the vDSO from glibc's DSO list. Before we started doing that, GDB would only ever lookup the vsyscall's address range once in the process's lifetime. Looking up the vDSO address range requires an auxv lookup (which is already cached, so no problem), but also reading the process's mappings from /proc to find out the vDSO's mapping's size. That generates extra RSP traffic when remote debugging. Particularly annoying when the process's mappings grow linearly as more libraries are mapped in, and we went through the trouble of making incremental DSO list updates work against gdbserver (when the probes-based dynamic linker interface is available). The vsyscall/vDSO is mapped by the kernel when the process is initially mapped in, and doesn't change throughout the process's lifetime, so we can cache its address range. Caching at this level brings GDB back to one and only one vsyscall address range lookup per process. Tested on x86_64 Fedora 20. gdb/ 2014-10-10 Pedro Alves <palves@redhat.com> * linux-tdep.c: Include observer.h. (linux_inferior_data): New global. (struct linux_info): New structure. (invalidate_linux_cache_inf, linux_inferior_data_cleanup) (get_linux_inferior_data): New functions. (linux_vsyscall_range): Rename to ... (linux_vsyscall_range_raw): ... this. (linux_vsyscall_range): New function; handles caching. (_initialize_linux_tdep): Register linux_inferior_data. Install inferior_exit and inferior_appeared observers.
Diffstat (limited to 'opcodes')
0 files changed, 0 insertions, 0 deletions