* [obv] [s390] gdbserver regcache compilation fix
@ 2010-01-21 19:29 Jan Kratochvil
2010-01-21 22:21 ` Pedro Alves
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kratochvil @ 2010-01-21 19:29 UTC (permalink / raw)
To: gdb-patches; +Cc: Pedro Alves
Hi Pedro,
checked-in this one as [obv] althought remains IMO-non-obv ppc:
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’
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2010-01/msg00193.html
--- src/gdb/gdbserver/ChangeLog 2010/01/21 18:35:42 1.324
+++ src/gdb/gdbserver/ChangeLog 2010/01/21 19:26:49 1.325
@@ -1,3 +1,8 @@
+2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * linux-s390-low.c (s390_collect_ptrace_register)
+ (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
+
2010-01-21 Doug Evans <dje@google.com>
* linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
--- src/gdb/gdbserver/linux-s390-low.c 2010/01/20 22:55:38 1.19
+++ src/gdb/gdbserver/linux-s390-low.c 2010/01/21 19:26:49 1.20
@@ -118,8 +118,9 @@
if ((regno ^ 1) < the_low_target.num_regs
&& the_low_target.regmap[regno ^ 1] == regaddr)
{
- collect_register (regno & ~1, buf);
- collect_register ((regno & ~1) + 1, buf + sizeof (long) - size);
+ collect_register (regcache, regno & ~1, buf);
+ collect_register (regcache, (regno & ~1) + 1,
+ buf + sizeof (long) - size);
}
else if (regaddr == PT_PSWADDR
|| (regaddr >= PT_GPR0 && regaddr <= PT_GPR15))
@@ -133,7 +134,7 @@
buf[size] |= 0x80;
}
else
- collect_register (regno, buf);
+ collect_register (regcache, regno, buf);
}
static void
@@ -147,8 +148,9 @@
if ((regno ^ 1) < the_low_target.num_regs
&& the_low_target.regmap[regno ^ 1] == regaddr)
{
- supply_register (regno & ~1, buf);
- supply_register ((regno & ~1) + 1, buf + sizeof (long) - size);
+ supply_register (regcache, regno & ~1, buf);
+ supply_register (regcache, (regno & ~1) + 1,
+ buf + sizeof (long) - size);
}
else if (regaddr == PT_PSWADDR
|| (regaddr >= PT_GPR0 && regaddr <= PT_GPR15))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [obv] [s390] gdbserver regcache compilation fix
2010-01-21 19:29 [obv] [s390] gdbserver regcache compilation fix Jan Kratochvil
@ 2010-01-21 22:21 ` Pedro Alves
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2010-01-21 22:21 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-21 22:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-21 19:29 [obv] [s390] gdbserver regcache compilation fix Jan Kratochvil
2010-01-21 22:21 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox