This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Patch for building gdb on arm-netbsd
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: Richard dot Earnshaw at arm dot com
- Date: Wed, 09 Jan 2002 13:34:03 +0000
- Subject: Patch for building gdb on arm-netbsd
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
Following the rules for converting to multi-arch, step one says we must
get it all to compile... So:
The following patch is needed to enable building of gdb on arm-netbsd.
The definition of IN_SIGTRAMP tests NAME for being NULL and if not calls
STREQ to compare the strings. However, STREQ dereferences the pointers
directly and this causes a compile time error for the NULL pointer (since
*(0) is not defined).
<date> Richard Earnshaw (rearnsha@arm.com)
* arm-tdep.c (arm_init_extra_frame_info): Cast NULL argument of
IN_SIGTRAMP to char *.
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.25
diff -p -r1.25 arm-tdep.c
*** arm-tdep.c 2002/01/05 04:30:15 1.25
--- arm-tdep.c 2002/01/09 13:24:50
*************** arm_init_extra_frame_info (int fromleaf,
*** 1060,1066 ****
to IN_SIGTRAMP. */
if (SIGCONTEXT_REGISTER_ADDRESS_P ()
! && (fi->signal_handler_caller || IN_SIGTRAMP (fi->pc, 0)))
{
for (reg = 0; reg < NUM_REGS; reg++)
fi->fsr.regs[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, fi->pc, reg);
--- 1060,1066 ----
to IN_SIGTRAMP. */
if (SIGCONTEXT_REGISTER_ADDRESS_P ()
! && (fi->signal_handler_caller || IN_SIGTRAMP (fi->pc, (char *)0)))
{
for (reg = 0; reg < NUM_REGS; reg++)
fi->fsr.regs[reg] = SIGCONTEXT_REGISTER_ADDRESS (sp, fi->pc, reg);