diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0e053e2feb..9c2e68d185 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-03-06 Hannes Domani + + * windows-tdep.c (windows_solib_create_inferior_hook): + Check if inferior is running. + 2020-03-06 Tom de Vries * NEWS: Fix "the the". diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c index 4e5d8303ca..e02b1ceed3 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);