From: Pedro Alves <pedro@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [obv] [s390] gdbserver regcache compilation fix
Date: Thu, 21 Jan 2010 22:21:00 -0000 [thread overview]
Message-ID: <201001212221.16194.pedro@codesourcery.com> (raw)
In-Reply-To: <20100121192852.GA18915@host0.dyn.jankratochvil.net>
On Thursday 21 January 2010 19:28:52, Jan Kratochvil wrote:
> Hi Pedro,
>
> checked-in this one as [obv] althought remains IMO-non-obv ppc:
Thanks.
>
> linux-ppc-low.c: In function ‘ppc_arch_setup’:
> linux-ppc-low.c:347: warning: passing argument 1 of ‘collect_register_by_name’ from incompatible pointer type
> linux-ppc-low.c:347: warning: passing argument 2 of ‘collect_register_by_name’ from incompatible pointer type
> linux-ppc-low.c:347: error: too few arguments to function ‘collect_register_by_name’
Hmm, I see, I only built a 32-bit ppc gdbserver, and this is code
guarded on #ifdef __powerpc64__.
The fix becomes obvious considering that before my change,
collect_registers_by_... used to call get_thread_registers itself, the
change mostly just moved this call up to the caller sites.
I've applied this patch below, after confirming a 64-bit
ppc gdbserver now builds. Let me know if something
still isn't working.
--
Pedro Alves
2010-01-21 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/
* linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
---
gdb/gdbserver/linux-ppc-low.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: src/gdb/gdbserver/linux-ppc-low.c
===================================================================
--- src.orig/gdb/gdbserver/linux-ppc-low.c 2010-01-21 13:46:00.000000000 -0800
+++ src/gdb/gdbserver/linux-ppc-low.c 2010-01-21 13:46:09.000000000 -0800
@@ -335,6 +335,7 @@ ppc_arch_setup (void)
{
#ifdef __powerpc64__
long msr;
+ struct regcache *regcache;
/* On a 64-bit host, assume 64-bit inferior process with no
AltiVec registers. Reset ppc_hwcap to ensure that the
@@ -344,7 +345,8 @@ ppc_arch_setup (void)
/* Only if the high bit of the MSR is set, we actually have
a 64-bit inferior. */
- collect_register_by_name ("msr", &msr);
+ regcache = get_thread_regcache (current_inferior, 1);
+ collect_register_by_name (regcache, "msr", &msr);
if (msr < 0)
{
ppc_get_hwcap (&ppc_hwcap);
prev parent reply other threads:[~2010-01-21 22:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 19:29 Jan Kratochvil
2010-01-21 22:21 ` Pedro Alves [this message]
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=201001212221.16194.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.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