This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: New gdb 31 & 64 bit patches for S/390
- To: DJBARROW at de dot ibm dot com
- Subject: Re: New gdb 31 & 64 bit patches for S/390
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 04 Jul 2001 13:13:53 -0400
- Cc: gdb-patches at sourceware dot cygnus dot com, s390-patches at gnu dot org,Binutils Patches <binutils at sourceware dot cygnus dot com>,bash_maintainers at gnu dot org, schwidefsky at de dot ibm dot com, ARENZ at de dot ibm dot com
- References: <C1256A00.006F3FCE.00@d12mta09.de.ibm.com>
DJB,
The patches included the change:
2001-02-26 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
* core-aout.c added check for CANNOT_FETCH_REGISTER
in fetch_core_registers.
--- src.orig/gdb/core-aout.c Sun Jul 30 03:48:24 2000
+++ src.new/gdb/core-aout.c Tue Feb 27 17:36:35 2001
@@ -81,6 +81,7 @@
int bad_reg = -1;
CORE_ADDR reg_ptr = -reg_addr; /* Original u.u_ar0 is -reg_addr. */
int numregs = ARCH_NUM_REGS;
+ char *buf=alloca(MAX_REGISTER_RAW_SIZE);
/* If u.u_ar0 was an absolute address in the core file, relativize
it now,
so we can use it as an offset into core_reg_sect. When we're done,
@@ -93,12 +94,20 @@
for (regno = 0; regno < numregs; regno++)
{
- addr = CORE_REGISTER_ADDR (regno, reg_ptr);
- if (addr >= core_reg_size
-
&& bad_reg < 0)
-
bad_reg = regno;
+ if (CANNOT_FETCH_REGISTER (regno))
+
{
+
memset (buf, '\0', REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
+
supply_register (regno, buf);
+
}
else
-
supply_register (regno, core_reg_sect + addr);
+
{
+
addr = CORE_REGISTER_ADDR (regno, reg_ptr);
+
if (addr >= core_reg_size
+
&& bad_reg < 0)
+
bad_reg = regno;
+
else
+
supply_register (regno, core_reg_sect + addr);
+
}
}
if (bad_reg >= 0)
Can you please expand on this change. I don't think it is s390 specific.
Andrew