This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA: make D10V gdbarch functions static
- To: gdb-patches at sources dot redhat dot com
- Subject: RFA: make D10V gdbarch functions static
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Date: Tue, 26 Jun 2001 13:47:09 -0500 (EST)
2001-06-26 Jim Blandy <jimb@redhat.com>
* d10v-tdep.c (10v_frame_chain_valid, d10v_use_struct_convention,
d10v_breakpoint_from_pc, d10v_register_byte,
d10v_register_raw_size, d10v_register_virtual_size,
d10v_register_virtual_type, d10v_register_convertible,
d10v_register_convert_to_virtual, d10v_register_convert_to_raw,
d10v_make_daddr, d10v_make_iaddr, d10v_daddr_p, d10v_iaddr_p,
d10v_convert_iaddr_to_raw, d10v_convert_daddr_to_raw,
d10v_store_struct_return, d10v_store_return_value,
d10v_extract_struct_value_address, d10v_frame_saved_pc,
d10v_saved_pc_after_call, d10v_pop_frame, d10v_skip_prologue,
d10v_frame_chain, d10v_frame_init_saved_regs,
d10v_init_extra_frame_info, d10v_read_pc, d10v_write_pc,
d10v_read_sp, d10v_write_sp, d10v_write_fp, d10v_read_fp,
d10v_push_return_address, d10v_push_arguments,
d10v_extract_return_value): Make these functions static.
Index: gdb/d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.18
diff -c -r1.18 d10v-tdep.c
*** gdb/d10v-tdep.c 2001/05/04 04:15:24 1.18
--- gdb/d10v-tdep.c 2001/06/26 18:34:48
***************
*** 100,106 ****
static void do_d10v_pop_frame (struct frame_info *fi);
! int
d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
{
return ((chain) != 0 && (frame) != 0 && (frame)->pc > IMEM_START);
--- 100,106 ----
static void do_d10v_pop_frame (struct frame_info *fi);
! static int
d10v_frame_chain_valid (CORE_ADDR chain, struct frame_info *frame)
{
return ((chain) != 0 && (frame) != 0 && (frame)->pc > IMEM_START);
***************
*** 119,132 ****
The d10v returns anything less than 8 bytes in size in
registers. */
! int
d10v_use_struct_convention (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 8);
}
! unsigned char *
d10v_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char breakpoint[] =
--- 119,132 ----
The d10v returns anything less than 8 bytes in size in
registers. */
! static int
d10v_use_struct_convention (int gcc_p, struct type *type)
{
return (TYPE_LENGTH (type) > 8);
}
! static unsigned char *
d10v_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char breakpoint[] =
***************
*** 276,282 ****
/* Index within `registers' of the first byte of the space for
register REG_NR. */
! int
d10v_register_byte (int reg_nr)
{
if (reg_nr < A0_REGNUM)
--- 276,282 ----
/* Index within `registers' of the first byte of the space for
register REG_NR. */
! static int
d10v_register_byte (int reg_nr)
{
if (reg_nr < A0_REGNUM)
***************
*** 293,299 ****
/* Number of bytes of storage in the actual machine representation for
register REG_NR. */
! int
d10v_register_raw_size (int reg_nr)
{
if (reg_nr < A0_REGNUM)
--- 293,299 ----
/* Number of bytes of storage in the actual machine representation for
register REG_NR. */
! static int
d10v_register_raw_size (int reg_nr)
{
if (reg_nr < A0_REGNUM)
***************
*** 307,313 ****
/* Number of bytes of storage in the program's representation
for register N. */
! int
d10v_register_virtual_size (int reg_nr)
{
return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg_nr));
--- 307,313 ----
/* Number of bytes of storage in the program's representation
for register N. */
! static int
d10v_register_virtual_size (int reg_nr)
{
return TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (reg_nr));
***************
*** 316,322 ****
/* Return the GDB type object for the "standard" data type
of data in register N. */
! struct type *
d10v_register_virtual_type (int reg_nr)
{
if (reg_nr >= A0_REGNUM
--- 316,322 ----
/* Return the GDB type object for the "standard" data type
of data in register N. */
! static struct type *
d10v_register_virtual_type (int reg_nr)
{
if (reg_nr >= A0_REGNUM
***************
*** 330,342 ****
}
/* convert $pc and $sp to/from virtual addresses */
! int
d10v_register_convertible (int nr)
{
return ((nr) == PC_REGNUM || (nr) == SP_REGNUM);
}
! void
d10v_register_convert_to_virtual (int regnum, struct type *type, char *from,
char *to)
{
--- 330,342 ----
}
/* convert $pc and $sp to/from virtual addresses */
! static int
d10v_register_convertible (int nr)
{
return ((nr) == PC_REGNUM || (nr) == SP_REGNUM);
}
! static void
d10v_register_convert_to_virtual (int regnum, struct type *type, char *from,
char *to)
{
***************
*** 348,354 ****
store_unsigned_integer (to, TYPE_LENGTH (type), x);
}
! void
d10v_register_convert_to_raw (struct type *type, int regnum, char *from,
char *to)
{
--- 348,354 ----
store_unsigned_integer (to, TYPE_LENGTH (type), x);
}
! static void
d10v_register_convert_to_raw (struct type *type, int regnum, char *from,
char *to)
{
***************
*** 360,397 ****
}
! CORE_ADDR
d10v_make_daddr (CORE_ADDR x)
{
return ((x) | DMEM_START);
}
! CORE_ADDR
d10v_make_iaddr (CORE_ADDR x)
{
return (((x) << 2) | IMEM_START);
}
! int
d10v_daddr_p (CORE_ADDR x)
{
return (((x) & 0x3000000) == DMEM_START);
}
! int
d10v_iaddr_p (CORE_ADDR x)
{
return (((x) & 0x3000000) == IMEM_START);
}
! CORE_ADDR
d10v_convert_iaddr_to_raw (CORE_ADDR x)
{
return (((x) >> 2) & 0xffff);
}
! CORE_ADDR
d10v_convert_daddr_to_raw (CORE_ADDR x)
{
return ((x) & 0xffff);
--- 360,397 ----
}
! static CORE_ADDR
d10v_make_daddr (CORE_ADDR x)
{
return ((x) | DMEM_START);
}
! static CORE_ADDR
d10v_make_iaddr (CORE_ADDR x)
{
return (((x) << 2) | IMEM_START);
}
! static int
d10v_daddr_p (CORE_ADDR x)
{
return (((x) & 0x3000000) == DMEM_START);
}
! static int
d10v_iaddr_p (CORE_ADDR x)
{
return (((x) & 0x3000000) == IMEM_START);
}
! static CORE_ADDR
d10v_convert_iaddr_to_raw (CORE_ADDR x)
{
return (((x) >> 2) & 0xffff);
}
! static CORE_ADDR
d10v_convert_daddr_to_raw (CORE_ADDR x)
{
return ((x) & 0xffff);
***************
*** 403,409 ****
We store structs through a pointer passed in the first Argument
register. */
! void
d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
write_register (ARG1_REGNUM, (addr));
--- 403,409 ----
We store structs through a pointer passed in the first Argument
register. */
! static void
d10v_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
{
write_register (ARG1_REGNUM, (addr));
***************
*** 414,420 ****
Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
! void
d10v_store_return_value (struct type *type, char *valbuf)
{
write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
--- 414,420 ----
Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
! static void
d10v_store_return_value (struct type *type, char *valbuf)
{
write_register_bytes (REGISTER_BYTE (RET1_REGNUM),
***************
*** 426,432 ****
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
! CORE_ADDR
d10v_extract_struct_value_address (char *regbuf)
{
return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM),
--- 426,432 ----
the address in which a function should return its structure value,
as a CORE_ADDR (or an expression that can be used as one). */
! static CORE_ADDR
d10v_extract_struct_value_address (char *regbuf)
{
return (extract_address ((regbuf) + REGISTER_BYTE (ARG1_REGNUM),
***************
*** 434,440 ****
| DMEM_START);
}
! CORE_ADDR
d10v_frame_saved_pc (struct frame_info *frame)
{
return ((frame)->extra_info->return_pc);
--- 434,440 ----
| DMEM_START);
}
! static CORE_ADDR
d10v_frame_saved_pc (struct frame_info *frame)
{
return ((frame)->extra_info->return_pc);
***************
*** 444,450 ****
use frame->return_pc beause that is determined by reading R13 off
the stack and that may not be written yet. */
! CORE_ADDR
d10v_saved_pc_after_call (struct frame_info *frame)
{
return ((read_register (LR_REGNUM) << 2)
--- 444,450 ----
use frame->return_pc beause that is determined by reading R13 off
the stack and that may not be written yet. */
! static CORE_ADDR
d10v_saved_pc_after_call (struct frame_info *frame)
{
return ((read_register (LR_REGNUM) << 2)
***************
*** 454,460 ****
/* Discard from the stack the innermost frame, restoring all saved
registers. */
! void
d10v_pop_frame (void)
{
generic_pop_current_frame (do_d10v_pop_frame);
--- 454,460 ----
/* Discard from the stack the innermost frame, restoring all saved
registers. */
! static void
d10v_pop_frame (void)
{
generic_pop_current_frame (do_d10v_pop_frame);
***************
*** 533,539 ****
return 0;
}
! CORE_ADDR
d10v_skip_prologue (CORE_ADDR pc)
{
unsigned long op;
--- 533,539 ----
return 0;
}
! static CORE_ADDR
d10v_skip_prologue (CORE_ADDR pc)
{
unsigned long op;
***************
*** 601,607 ****
INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
*/
! CORE_ADDR
d10v_frame_chain (struct frame_info *fi)
{
d10v_frame_init_saved_regs (fi);
--- 601,607 ----
INIT_EXTRA_FRAME_INFO and INIT_FRAME_PC will be called for the new frame.
*/
! static CORE_ADDR
d10v_frame_chain (struct frame_info *fi)
{
d10v_frame_init_saved_regs (fi);
***************
*** 700,706 ****
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
! void
d10v_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR fp, pc;
--- 700,706 ----
in the stack frame. sp is even more special: the address we return
for it IS the sp for the next frame. */
! static void
d10v_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR fp, pc;
***************
*** 801,807 ****
}
}
! void
d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
fi->extra_info = (struct frame_extra_info *)
--- 801,807 ----
}
}
! static void
d10v_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
fi->extra_info = (struct frame_extra_info *)
***************
*** 884,890 ****
printf_filtered ("\n");
}
! CORE_ADDR
d10v_read_pc (ptid_t ptid)
{
ptid_t save_ptid;
--- 884,890 ----
printf_filtered ("\n");
}
! static CORE_ADDR
d10v_read_pc (ptid_t ptid)
{
ptid_t save_ptid;
***************
*** 899,905 ****
return retval;
}
! void
d10v_write_pc (CORE_ADDR val, ptid_t ptid)
{
ptid_t save_ptid;
--- 899,905 ----
return retval;
}
! static void
d10v_write_pc (CORE_ADDR val, ptid_t ptid)
{
ptid_t save_ptid;
***************
*** 910,934 ****
inferior_ptid = save_ptid;
}
! CORE_ADDR
d10v_read_sp (void)
{
return (D10V_MAKE_DADDR (read_register (SP_REGNUM)));
}
! void
d10v_write_sp (CORE_ADDR val)
{
write_register (SP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
}
! void
d10v_write_fp (CORE_ADDR val)
{
write_register (FP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
}
! CORE_ADDR
d10v_read_fp (void)
{
return (D10V_MAKE_DADDR (read_register (FP_REGNUM)));
--- 910,934 ----
inferior_ptid = save_ptid;
}
! static CORE_ADDR
d10v_read_sp (void)
{
return (D10V_MAKE_DADDR (read_register (SP_REGNUM)));
}
! static void
d10v_write_sp (CORE_ADDR val)
{
write_register (SP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
}
! static void
d10v_write_fp (CORE_ADDR val)
{
write_register (FP_REGNUM, D10V_CONVERT_DADDR_TO_RAW (val));
}
! static CORE_ADDR
d10v_read_fp (void)
{
return (D10V_MAKE_DADDR (read_register (FP_REGNUM)));
***************
*** 938,944 ****
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
d10v_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (LR_REGNUM, D10V_CONVERT_IADDR_TO_RAW (CALL_DUMMY_ADDRESS ()));
--- 938,944 ----
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
d10v_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
{
write_register (LR_REGNUM, D10V_CONVERT_IADDR_TO_RAW (CALL_DUMMY_ADDRESS ()));
***************
*** 982,988 ****
}
! CORE_ADDR
d10v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
--- 982,988 ----
}
! static CORE_ADDR
d10v_push_arguments (int nargs, value_ptr *args, CORE_ADDR sp,
int struct_return, CORE_ADDR struct_addr)
{
***************
*** 1079,1085 ****
/* Given a return value in `regbuf' with a type `valtype',
extract and copy its value into `valbuf'. */
! void
d10v_extract_return_value (struct type *type, char regbuf[REGISTER_BYTES],
char *valbuf)
{
--- 1079,1085 ----
/* Given a return value in `regbuf' with a type `valtype',
extract and copy its value into `valbuf'. */
! static void
d10v_extract_return_value (struct type *type, char regbuf[REGISTER_BYTES],
char *valbuf)
{