From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: "Ulrich Weigand" <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 2/3] gdbserver: Prevent stale/random values in register cache
Date: Thu, 11 Dec 2014 17:05:00 -0000 [thread overview]
Message-ID: <87bnnam820.fsf@br87z6lw.de.ibm.com> (raw)
In-Reply-To: <201412101913.sBAJDpc9007580@d03av02.boulder.ibm.com> (Ulrich Weigand's message of "Wed, 10 Dec 2014 20:13:50 +0100 (CET)")
On Wed, Dec 10 2014, Ulrich Weigand wrote:
> Andreas Arnez wrote:
>
>> @@ -52,6 +52,11 @@ get_thread_regcache (struct thread_info *thread, int fetch)
>> struct thread_info *saved_thread = current_thread;
>>
>> current_thread = thread;
>> +#ifndef IN_PROCESS_AGENT
>> + /* Invalidate all registers, to prevent stale left-overs. */
>> + memset (regcache->register_status, REG_UNAVAILABLE,
>> + regcache->tdesc->num_registers);
>> +#endif
>> fetch_inferior_registers (regcache, -1);
>> current_thread = saved_thread;
>> regcache->registers_valid = 1;
>
> The whole get_thread_regcache routine is already under #ifndef IN_PROCESS_AGENT,
> so the ifdef seems redundant here.
Correct ;-) Will be removed in the next version.
next prev parent reply other threads:[~2014-12-11 17:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 13:59 [PATCH v3 0/3] gdbserver: Fix support for S390 TDB Andreas Arnez
2014-12-09 13:59 ` [PATCH v3 1/3] gdbserver: Rephrase loops in regsets_fetch/store_inferior_registers Andreas Arnez
2014-12-09 13:59 ` [PATCH v3 2/3] gdbserver: Prevent stale/random values in register cache Andreas Arnez
2014-12-10 19:14 ` Ulrich Weigand
2014-12-11 17:05 ` Andreas Arnez [this message]
2014-12-09 13:59 ` [PATCH v3 3/3] S390: Fix gdbserver support for TDB Andreas Arnez
2014-12-10 19:16 ` Ulrich Weigand
2014-12-11 17:04 ` Andreas Arnez
2014-12-11 20:16 ` Ulrich Weigand
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=87bnnam820.fsf@br87z6lw.de.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).