aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-tdep.c
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2020-03-04 21:20:31 +0100
committerHannes Domani <ssbssa@yahoo.de>2020-03-06 18:38:47 +0100
commitb7d64b29094ef58448c9b41bcde299fad2976237 (patch)
treebbba6e4e83a097872fe69aca74ac2f08cb9d1f41 /gdb/windows-tdep.c
parent84d9ab33f3dc542c5f20abb9026240cfd48ccd97 (diff)
downloadfsf-binutils-gdb-b7d64b29094ef58448c9b41bcde299fad2976237.zip
fsf-binutils-gdb-b7d64b29094ef58448c9b41bcde299fad2976237.tar.gz
fsf-binutils-gdb-b7d64b29094ef58448c9b41bcde299fad2976237.tar.bz2
Don't try to get the TIB address without an inferior
The target_get_tib_address call always fails in this case, and there is an error when changing the program with the file command: (gdb) file allocer64.exe Reading symbols from allocer64.exe... You can't do that when your target is `exec' Now it will skip this part, there is no need to rebase the executable without an inferior anyways. gdb/ChangeLog: 2020-03-06 Hannes Domani <ssbssa@yahoo.de> * windows-tdep.c (windows_solib_create_inferior_hook): Check if inferior is running.
Diffstat (limited to 'gdb/windows-tdep.c')
-rw-r--r--gdb/windows-tdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index 4e5d830..e02b1ce 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -843,7 +843,8 @@ windows_solib_create_inferior_hook (int from_tty)
}
CORE_ADDR tlb;
gdb_byte buf[8];
- if (target_get_tib_address (inferior_ptid, &tlb)
+ if (target_has_execution
+ && target_get_tib_address (inferior_ptid, &tlb)
&& !target_read_memory (tlb + peb_offset, buf, ptr_bytes))
{
CORE_ADDR peb = extract_unsigned_integer (buf, ptr_bytes, byte_order);