diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a407c04bf5..026aaf1703 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2020-01-23 Hannes Domani + + * i386-cygwin-tdep.c (core_process_module_section): Update. + * windows-nat.c (struct lm_info_windows): Add text_offset. + (windows_xfer_shared_libraries): Update. + * windows-tdep.c (windows_xfer_shared_library): + Add text_offset_cached argument. + * windows-tdep.h (windows_xfer_shared_library): Update. + 2020-01-21 Simon Marchi * gdbarch.sh: Add declaration for _initialize_gdbarch. diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c index f703579efd..cb66632648 100644 --- a/gdb/i386-cygwin-tdep.c +++ b/gdb/i386-cygwin-tdep.c @@ -137,7 +137,7 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj) /* The first module is the .exe itself. */ if (data->module_count != 0) windows_xfer_shared_library (module_name, base_addr, - data->gdbarch, data->obstack); + NULL, data->gdbarch, data->obstack); data->module_count++; out: diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 901e64263c..366c98fbf3 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -682,6 +682,7 @@ windows_nat_target::store_registers (struct regcache *regcache, int r) struct lm_info_windows : public lm_info_base { LPVOID load_addr = 0; + CORE_ADDR text_offset = 0; }; static struct so_list solib_start, *solib_end; @@ -2974,6 +2975,7 @@ windows_xfer_shared_libraries (struct target_ops *ops, windows_xfer_shared_library (so->so_name, (CORE_ADDR) (uintptr_t) li->load_addr, + &li->text_offset, target_gdbarch (), &obstack); } obstack_grow_str0 (&obstack, "\n"); diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c index 1fc2748581..6c9632d035 100644 --- a/gdb/windows-tdep.c +++ b/gdb/windows-tdep.c @@ -483,19 +483,27 @@ display_tib (const char * args, int from_tty) void windows_xfer_shared_library (const char* so_name, CORE_ADDR load_addr, + CORE_ADDR *text_offset_cached, struct gdbarch *gdbarch, struct obstack *obstack) { - CORE_ADDR text_offset; + CORE_ADDR text_offset = text_offset_cached ? *text_offset_cached : 0; obstack_grow_str (obstack, ""); } diff --git a/gdb/windows-tdep.h b/gdb/windows-tdep.h index ab6c2d6e55..34474f259c 100644 --- a/gdb/windows-tdep.h +++ b/gdb/windows-tdep.h @@ -27,6 +27,7 @@ extern void init_w32_command_list (void); extern void windows_xfer_shared_library (const char* so_name, CORE_ADDR load_addr, + CORE_ADDR *text_offset_cached, struct gdbarch *gdbarch, struct obstack *obstack);