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]

PATCH: make gdbarch method functions static



2001-05-04  Jim Blandy  <jimb@redhat.com>

	* mn10300-tdep.c (mn10300_saved_pc_after_call,
	mn10300_extract_return_value,
	mn10300_extract_struct_value_address, mn10300_store_return_value,
	mn10300_use_struct_convention, mn10300_breakpoint_from_pc,
	mn10300_frame_chain, mn10300_skip_prologue,
	mn10300_push_arguments, mn10300_push_return_address,
	mn10300_store_struct_return, mn10300_frame_saved_pc,
	mn10300_init_extra_frame_info, mn10300_frame_init_saved_regs):
	Make these functions static; they should only be visible to the
	outside world as gdbarch methods.
	
*** gdb/mn10300-tdep.c.base	Fri May  4 14:04:17 2001
--- gdb/mn10300-tdep.c	Fri May  4 14:34:41 2001
***************
*** 86,92 ****
    return register_name (reg, regs, sizeof regs);
  }
    
! CORE_ADDR
  mn10300_saved_pc_after_call (struct frame_info *fi)
  {
    return read_memory_integer (read_register (SP_REGNUM), 4);
--- 86,92 ----
    return register_name (reg, regs, sizeof regs);
  }
    
! static CORE_ADDR
  mn10300_saved_pc_after_call (struct frame_info *fi)
  {
    return read_memory_integer (read_register (SP_REGNUM), 4);
***************
*** 101,114 ****
      memcpy (valbuf, regbuf + REGISTER_BYTE (0), TYPE_LENGTH (type));
  }
  
! CORE_ADDR
  mn10300_extract_struct_value_address (char *regbuf)
  {
    return extract_address (regbuf + REGISTER_BYTE (4),
  			  REGISTER_RAW_SIZE (4));
  }
  
! void
  mn10300_store_return_value (struct type *type, char *valbuf)
  {
    if (TYPE_CODE (type) == TYPE_CODE_PTR)
--- 101,114 ----
      memcpy (valbuf, regbuf + REGISTER_BYTE (0), TYPE_LENGTH (type));
  }
  
! static CORE_ADDR
  mn10300_extract_struct_value_address (char *regbuf)
  {
    return extract_address (regbuf + REGISTER_BYTE (4),
  			  REGISTER_RAW_SIZE (4));
  }
  
! static void
  mn10300_store_return_value (struct type *type, char *valbuf)
  {
    if (TYPE_CODE (type) == TYPE_CODE_PTR)
***************
*** 147,153 ****
  
  
  /* Should call_function allocate stack space for a struct return?  */
! int
  mn10300_use_struct_convention (int gcc_p, struct type *type)
  {
    return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 8);
--- 147,153 ----
  
  
  /* Should call_function allocate stack space for a struct return?  */
! static int
  mn10300_use_struct_convention (int gcc_p, struct type *type)
  {
    return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 8);
***************
*** 160,166 ****
     so we need a single byte breakpoint.  Matsushita hasn't defined
     one, so we defined it ourselves.  */
  
! unsigned char *
  mn10300_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size)
  {
    static char breakpoint[] =
--- 160,166 ----
     so we need a single byte breakpoint.  Matsushita hasn't defined
     one, so we defined it ourselves.  */
  
! static unsigned char *
  mn10300_breakpoint_from_pc (CORE_ADDR *bp_addr, int *bp_size)
  {
    static char breakpoint[] =
***************
*** 517,523 ****
     We don't handle dummy frames yet but we would probably just return the
     stack pointer that was in use at the time the function call was made?  */
  
! CORE_ADDR
  mn10300_frame_chain (struct frame_info *fi)
  {
    struct frame_info *dummy;
--- 517,523 ----
     We don't handle dummy frames yet but we would probably just return the
     stack pointer that was in use at the time the function call was made?  */
  
! static CORE_ADDR
  mn10300_frame_chain (struct frame_info *fi)
  {
    struct frame_info *dummy;
***************
*** 584,590 ****
  /* Function: skip_prologue
     Return the address of the first inst past the prologue of the function.  */
  
! CORE_ADDR
  mn10300_skip_prologue (CORE_ADDR pc)
  {
    /* We used to check the debug symbols, but that can lose if
--- 584,590 ----
  /* Function: skip_prologue
     Return the address of the first inst past the prologue of the function.  */
  
! static CORE_ADDR
  mn10300_skip_prologue (CORE_ADDR pc)
  {
    /* We used to check the debug symbols, but that can lose if
***************
*** 633,639 ****
     Setup arguments for a call to the target.  Arguments go in
     order on the stack.  */
  
! CORE_ADDR
  mn10300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
  			int struct_return, CORE_ADDR struct_addr)
  {
--- 633,639 ----
     Setup arguments for a call to the target.  Arguments go in
     order on the stack.  */
  
! static CORE_ADDR
  mn10300_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
  			int struct_return, CORE_ADDR struct_addr)
  {
***************
*** 714,720 ****
     Set up the return address for the inferior function call.
     Needed for targets where we don't actually execute a JSR/BSR instruction */
  
! CORE_ADDR
  mn10300_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
  {
    unsigned char buf[4];
--- 714,720 ----
     Set up the return address for the inferior function call.
     Needed for targets where we don't actually execute a JSR/BSR instruction */
  
! static CORE_ADDR
  mn10300_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
  {
    unsigned char buf[4];
***************
*** 728,734 ****
     Store the structure value return address for an inferior function
     call.  */
  
! void
  mn10300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
  {
    /* The structure return address is passed as the first argument.  */
--- 728,734 ----
     Store the structure value return address for an inferior function
     call.  */
  
! static void
  mn10300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
  {
    /* The structure return address is passed as the first argument.  */
***************
*** 742,748 ****
     instead of RP, because that's where "caller" of the dummy-frame
     will be found.  */
  
! CORE_ADDR
  mn10300_frame_saved_pc (struct frame_info *fi)
  {
    int adjust = 0;
--- 742,748 ----
     instead of RP, because that's where "caller" of the dummy-frame
     will be found.  */
  
! static CORE_ADDR
  mn10300_frame_saved_pc (struct frame_info *fi)
  {
    int adjust = 0;
***************
*** 776,782 ****
     First, during normal backtracing, second, while figuring out the frame
     pointer just prior to calling the target function (see run_stack_dummy).  */
  
! void
  mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
  {
    if (fi->next)
--- 776,782 ----
     First, during normal backtracing, second, while figuring out the frame
     pointer just prior to calling the target function (see run_stack_dummy).  */
  
! static void
  mn10300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
  {
    if (fi->next)
***************
*** 794,800 ****
  
  
  /* This function's job is handled by init_extra_frame_info.  */
! void
  mn10300_frame_init_saved_regs (struct frame_info *frame)
  {
  }
--- 794,800 ----
  
  
  /* This function's job is handled by init_extra_frame_info.  */
! static void
  mn10300_frame_init_saved_regs (struct frame_info *frame)
  {
  }


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