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]

Re: arm-elf and SIGCONTEXT_REGISTER_ADDRESS


Andrew Cagney wrote:
> 
> FYI,
> 
> The way the macro SIGCONTEXT_REGISTER_ADDRESS is defined doesn't go down
> well with GCC.  I'm seeing:
> 
> src/gdb/arm-tdep.c: In function `arm_init_extra_frame_info':
> src/gdb/arm-tdep.c:1054: called object is not a function

The attatched gets around this immediate problem and fixes a few other
warnings that the protoize changes turn up.

	OK?
		Andrew
Wed Sep  6 23:15:43 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* remote-rdi.c (voiddummy): Update function signature to match
 	struct Dbg_HostosInterface's reset method.

	* remote-rdp.c (rdp_step): Fix handle parameter to
 	remote_rdp_insert_breakpoint and remote_rdp_remove_breakpoint.

	* arm-tdep.c (SIGCONTEXT_REGISTER_ADDRESS_P): Provide default
 	definition.
	(arm_init_extra_frame_info): Use.

Index: gdb/arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.8
diff -p -r1.8 arm-tdep.c
*** arm-tdep.c	2000/09/06 00:39:11	1.8
--- arm-tdep.c	2000/09/06 12:33:30
***************
*** 51,59 ****
     done.  It should not be necessary to modify the code below where
     this macro is used.  */
  
! #ifndef SIGCONTEXT_REGISTER_ADDRESS
! #define SIGCONTEXT_REGISTER_ADDRESS 0
  #endif
  
  extern void _initialize_arm_tdep (void);
  
--- 51,64 ----
     done.  It should not be necessary to modify the code below where
     this macro is used.  */
  
! #ifdef SIGCONTEXT_REGISTER_ADDRESS
! #ifndef SIGCONTEXT_REGISTER_ADDRESS_P
! #define SIGCONTEXT_REGISTER_ADDRESS_P() 1
  #endif
+ #else
+ #define SIGCONTEXT_REGISTER_ADDRESS(SP,PC,REG) 0
+ #define SIGCONTEXT_REGISTER_ADDRESS_P() 0
+ #endif
  
  extern void _initialize_arm_tdep (void);
  
*************** arm_init_extra_frame_info (int fromleaf,
*** 1040,1046 ****
       to first fetch the name of the function and then pass this name
       to IN_SIGTRAMP. */
  
!   if (SIGCONTEXT_REGISTER_ADDRESS 
        && (fi->signal_handler_caller || IN_SIGTRAMP (fi->pc, 0)))
      {
        CORE_ADDR sp;
--- 1045,1051 ----
       to first fetch the name of the function and then pass this name
       to IN_SIGTRAMP. */
  
!   if (SIGCONTEXT_REGISTER_ADDRESS_P () 
        && (fi->signal_handler_caller || IN_SIGTRAMP (fi->pc, 0)))
      {
        CORE_ADDR sp;
Index: gdb/remote-rdi.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-rdi.c,v
retrieving revision 1.5
diff -p -r1.5 remote-rdi.c
*** remote-rdi.c	2000/07/30 01:48:27	1.5
--- remote-rdi.c	2000/09/06 12:33:32
*************** arm_rdi_start_remote (char *dummy)
*** 141,147 ****
     these to forward output from the target system and so forth.  */
  
  void
! voiddummy (void)
  {
    fprintf_unfiltered (gdb_stdout, "void dummy\n");
  }
--- 141,147 ----
     these to forward output from the target system and so forth.  */
  
  void
! voiddummy (void *dummy)
  {
    fprintf_unfiltered (gdb_stdout, "void dummy\n");
  }
Index: gdb/remote-rdp.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-rdp.c,v
retrieving revision 1.4
diff -p -r1.4 remote-rdp.c
*** remote-rdp.c	2000/07/30 01:48:27	1.4
--- remote-rdp.c	2000/09/06 12:33:35
*************** rdp_step (void)
*** 1096,1104 ****
        char handle[4];
        CORE_ADDR pc = read_register (PC_REGNUM);
        pc = arm_get_next_pc (pc);
!       remote_rdp_insert_breakpoint (pc, &handle);
        rdp_execute ();
!       remote_rdp_remove_breakpoint (pc, &handle);
      }
  }
  
--- 1096,1104 ----
        char handle[4];
        CORE_ADDR pc = read_register (PC_REGNUM);
        pc = arm_get_next_pc (pc);
!       remote_rdp_insert_breakpoint (pc, handle);
        rdp_execute ();
!       remote_rdp_remove_breakpoint (pc, handle);
      }
  }
  

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