From: "Hannes Domani via gdb-patches" <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] Don't try to get the TIB address without an inferior
Date: Fri, 06 Mar 2020 16:50:00 -0000 [thread overview]
Message-ID: <20200306165000.3073-1-ssbssa@yahoo.de> (raw)
In-Reply-To: <20200306165000.3073-1-ssbssa.ref@yahoo.de>
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 inferior_ptid.
---
gdb/windows-tdep.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index 4e5d8303ca..a3bacc2211 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 (inferior_ptid != null_ptid
+ && 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);
--
2.25.1
next parent reply other threads:[~2020-03-06 16:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200306165000.3073-1-ssbssa.ref@yahoo.de>
2020-03-06 16:50 ` Hannes Domani via gdb-patches [this message]
2020-03-06 16:57 ` Simon Marchi
2020-03-06 17:05 ` Simon Marchi
2020-03-06 17:12 ` Hannes Domani via gdb-patches
2020-03-06 17:21 ` Simon Marchi
2020-03-06 17:42 ` Hannes Domani via gdb-patches
2020-03-06 17:06 ` Hannes Domani via gdb-patches
2020-03-06 17:13 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200306165000.3073-1-ssbssa@yahoo.de \
--to=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox