From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: [PATCH 2/2] S390: Fix gdbserver support for TDB
Date: Tue, 09 Dec 2014 16:10:00 -0000 [thread overview]
Message-ID: <877fy0old4.fsf@br87z6lw.de.ibm.com> (raw)
In-Reply-To: <54806247.8050000@redhat.com> (Pedro Alves's message of "Thu, 04 Dec 2014 13:31:51 +0000")
On Thu, Dec 04 2014, Pedro Alves wrote:
> On 12/03/2014 06:18 PM, Andreas Arnez wrote:
>> [...]
>>
>> For illustration, why don't we do something like the (untested) patch
>> below?
>>
>> --
>> diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c
>> index 718ae8c..b0f6a22 100644
>> --- a/gdb/gdbserver/regcache.c
>> +++ b/gdb/gdbserver/regcache.c
>> @@ -52,6 +52,8 @@ get_thread_regcache (struct thread_info *thread, int fetch)
>> struct thread_info *saved_thread = current_thread;
>>
>> current_thread = thread;
>> + memset (regcache->register_status, REG_UNAVAILABLE,
>> + regcache->tdesc->num_registers);
>
> This makes sense to me, it's similar to gdb's own handling.
> See gdb/regcache.c:regcache_raw_read (and regcache_invalidate).
>
> Can you check the patch on x86 too, please? You'll need the
> same #ifdef guard as init_register_cache uses; s390
> doesn't build the IPA.
>
>> fetch_inferior_registers (regcache, -1);
>> current_thread = saved_thread;
>> regcache->registers_valid = 1;
OK, did that, and it seems to work for me with the #ifdef guard added.
See the updated patch set:
https://sourceware.org/ml/gdb-patches/2014-12/msg00193.html
--
Andreas
next prev parent reply other threads:[~2014-12-09 16:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 11:56 [PATCH 0/2] S390: Fixes for gdbserver on targets with TDB Andreas Arnez
2014-11-26 11:56 ` [PATCH 2/2] S390: Fix gdbserver support for TDB Andreas Arnez
2014-12-01 18:15 ` Andreas Arnez
2014-12-01 18:40 ` Ulrich Weigand
2014-12-02 15:21 ` Pedro Alves
2014-12-02 19:18 ` Andreas Arnez
2014-12-03 18:18 ` Andreas Arnez
2014-12-04 13:33 ` Pedro Alves
2014-12-09 16:10 ` Andreas Arnez [this message]
2014-12-04 13:39 ` Pedro Alves
2014-11-26 11:56 ` [PATCH 1/2] S390: Fix 'expedite' for s390-te-linux64 Andreas Arnez
2014-12-01 18:34 ` 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=877fy0old4.fsf@br87z6lw.de.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--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