This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch for building gdb on arm-netbsd


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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]