* [PATCH] Further mips gdbarch-ification
@ 2002-08-19 19:38 Michael Snyder
2002-08-19 19:42 ` Michael Snyder
2002-08-20 12:41 ` Michael Snyder
0 siblings, 2 replies; 3+ messages in thread
From: Michael Snyder @ 2002-08-19 19:38 UTC (permalink / raw)
To: gdb-patches
Arch-ify FRAME_CHAIN, FRAME_CHAIN_VALID, FRAMELESS_FUNCTION_INVOCATION,
FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
FRAME_NUM_ARGS, and FRAME_ARGS_SKIP.
This patch is predicated on the previous patch, since gdbarch
will give an internal error if these values are gdbarch-ified,
but store_struct_return is not.
2002-08-19 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_frame_num_args): New function.
(mips_gdbarch_init): Set frame_chain, frameless_function_invocation,
frame_saved_pc, frame_args_address, frame_locals_address,
frame_num_args, and frame_args_skip.
* config/mips/tm-mips.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION,
FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
FRAME_NUM_ARGS, FRAME_ARGS_SKIP): Delete.
* config/mips/tm-mipsv4.h (FRAME_CHAIN_VALID): Delete.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.108
diff -p -r1.108 mips-tdep.c
*** mips-tdep.c 19 Aug 2002 23:22:17 -0000 1.108
--- mips-tdep.c 20 Aug 2002 02:29:26 -0000
*************** mips_do_registers_info (int regnum, int
*** 4140,4154 ****
}
}
- /* Return number of args passed to a frame. described by FIP.
- Can return -1, meaning no way to tell. */
-
- int
- mips_frame_num_args (struct frame_info *frame)
- {
- return -1;
- }
-
/* Is this a branch with a delay slot? */
static int is_delayed (unsigned long);
--- 4140,4145 ----
*************** mips_gdbarch_init (struct gdbarch_info i
*** 5809,5815 ****
--- 5800,5815 ----
set_gdbarch_coerce_float_to_double (gdbarch, mips_coerce_float_to_double);
+ set_gdbarch_frame_chain (gdbarch, mips_frame_chain);
set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
+ set_gdbarch_frameless_function_invocation (gdbarch,
+ generic_frameless_function_invocation_not);
+ set_gdbarch_frame_saved_pc (gdbarch, mips_frame_saved_pc);
+ set_gdbarch_frame_args_address (gdbarch, default_frame_address);
+ set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
+ set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
+ set_gdbarch_frame_args_skip (gdbarch, 0);
+
set_gdbarch_get_saved_register (gdbarch, mips_get_saved_register);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
Index: config/mips/tm-mips.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v
retrieving revision 1.36
diff -p -r1.36 tm-mips.h
*** config/mips/tm-mips.h 18 Aug 2002 18:59:53 -0000 1.36
--- config/mips/tm-mips.h 20 Aug 2002 02:29:26 -0000
*************** extern void mips_register_convert_from_t
*** 189,233 ****
REGISTER_RAW_SIZE (V0_REGNUM)))
\f
- /* Describe the pointer in each stack frame to the previous stack frame
- (its caller). */
-
- /* FRAME_CHAIN takes a frame's nominal address
- and produces the frame's chain-pointer. */
-
- #define FRAME_CHAIN(thisframe) (CORE_ADDR) mips_frame_chain (thisframe)
- extern CORE_ADDR mips_frame_chain (struct frame_info *);
-
- /* Define other aspects of the stack frame. */
-
-
- /* A macro that tells us whether the function invocation represented
- by FI does not have a frame on the stack associated with it. If it
- does not, FRAMELESS is set to 1, else 0. */
- /* We handle this differently for mips, and maybe we should not */
-
- #define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
-
- /* Saved Pc. */
-
- #define FRAME_SAVED_PC(FRAME) (mips_frame_saved_pc(FRAME))
- extern CORE_ADDR mips_frame_saved_pc (struct frame_info *);
-
- #define FRAME_ARGS_ADDRESS(fi) (fi)->frame
-
- #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
-
- /* Return number of args passed to a frame.
- Can return -1, meaning no way to tell. */
-
- #define FRAME_NUM_ARGS(fi) (mips_frame_num_args(fi))
- extern int mips_frame_num_args (struct frame_info *);
-
- /* Return number of bytes at start of arglist that are not really args. */
-
- #define FRAME_ARGS_SKIP 0
-
- \f
/* Things needed for making the inferior call functions. */
--- 189,194 ----
Index: config/mips/tm-mipsv4.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-mipsv4.h,v
retrieving revision 1.4
diff -p -r1.4 tm-mipsv4.h
*** config/mips/tm-mipsv4.h 5 Jun 2002 19:18:25 -0000 1.4
--- config/mips/tm-mipsv4.h 20 Aug 2002 02:29:26 -0000
***************
*** 33,40 ****
#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 40 + 35 * 4)
#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 40 + 36 * 4)
- /* Use the alternate method of determining valid frame chains. */
- #define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
-
/* Convert a DWARF register number to a gdb REGNUM. */
#define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
--- 33,37 ----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Further mips gdbarch-ification
2002-08-19 19:38 [PATCH] Further mips gdbarch-ification Michael Snyder
@ 2002-08-19 19:42 ` Michael Snyder
2002-08-20 12:41 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2002-08-19 19:42 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
Note - not checked in, waiting for previous patch (STORE_STRUCT_RETURN)
to be approved.
Michael Snyder wrote:
>
> Arch-ify FRAME_CHAIN, FRAME_CHAIN_VALID, FRAMELESS_FUNCTION_INVOCATION,
> FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
> FRAME_NUM_ARGS, and FRAME_ARGS_SKIP.
>
> This patch is predicated on the previous patch, since gdbarch
> will give an internal error if these values are gdbarch-ified,
> but store_struct_return is not.
>
> 2002-08-19 Michael Snyder <msnyder@redhat.com>
>
> * mips-tdep.c (mips_frame_num_args): New function.
> (mips_gdbarch_init): Set frame_chain, frameless_function_invocation,
> frame_saved_pc, frame_args_address, frame_locals_address,
> frame_num_args, and frame_args_skip.
> * config/mips/tm-mips.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION,
> FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
> FRAME_NUM_ARGS, FRAME_ARGS_SKIP): Delete.
> * config/mips/tm-mipsv4.h (FRAME_CHAIN_VALID): Delete.
>
> Index: mips-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/mips-tdep.c,v
> retrieving revision 1.108
> diff -p -r1.108 mips-tdep.c
> *** mips-tdep.c 19 Aug 2002 23:22:17 -0000 1.108
> --- mips-tdep.c 20 Aug 2002 02:29:26 -0000
> *************** mips_do_registers_info (int regnum, int
> *** 4140,4154 ****
> }
> }
>
> - /* Return number of args passed to a frame. described by FIP.
> - Can return -1, meaning no way to tell. */
> -
> - int
> - mips_frame_num_args (struct frame_info *frame)
> - {
> - return -1;
> - }
> -
> /* Is this a branch with a delay slot? */
>
> static int is_delayed (unsigned long);
> --- 4140,4145 ----
> *************** mips_gdbarch_init (struct gdbarch_info i
> *** 5809,5815 ****
> --- 5800,5815 ----
>
> set_gdbarch_coerce_float_to_double (gdbarch, mips_coerce_float_to_double);
>
> + set_gdbarch_frame_chain (gdbarch, mips_frame_chain);
> set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
> + set_gdbarch_frameless_function_invocation (gdbarch,
> + generic_frameless_function_invocation_not);
> + set_gdbarch_frame_saved_pc (gdbarch, mips_frame_saved_pc);
> + set_gdbarch_frame_args_address (gdbarch, default_frame_address);
> + set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
> + set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
> + set_gdbarch_frame_args_skip (gdbarch, 0);
> +
> set_gdbarch_get_saved_register (gdbarch, mips_get_saved_register);
>
> set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
> Index: config/mips/tm-mips.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v
> retrieving revision 1.36
> diff -p -r1.36 tm-mips.h
> *** config/mips/tm-mips.h 18 Aug 2002 18:59:53 -0000 1.36
> --- config/mips/tm-mips.h 20 Aug 2002 02:29:26 -0000
> *************** extern void mips_register_convert_from_t
> *** 189,233 ****
> REGISTER_RAW_SIZE (V0_REGNUM)))
>
>
> - /* Describe the pointer in each stack frame to the previous stack frame
> - (its caller). */
> -
> - /* FRAME_CHAIN takes a frame's nominal address
> - and produces the frame's chain-pointer. */
> -
> - #define FRAME_CHAIN(thisframe) (CORE_ADDR) mips_frame_chain (thisframe)
> - extern CORE_ADDR mips_frame_chain (struct frame_info *);
> -
> - /* Define other aspects of the stack frame. */
> -
> -
> - /* A macro that tells us whether the function invocation represented
> - by FI does not have a frame on the stack associated with it. If it
> - does not, FRAMELESS is set to 1, else 0. */
> - /* We handle this differently for mips, and maybe we should not */
> -
> - #define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
> -
> - /* Saved Pc. */
> -
> - #define FRAME_SAVED_PC(FRAME) (mips_frame_saved_pc(FRAME))
> - extern CORE_ADDR mips_frame_saved_pc (struct frame_info *);
> -
> - #define FRAME_ARGS_ADDRESS(fi) (fi)->frame
> -
> - #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
> -
> - /* Return number of args passed to a frame.
> - Can return -1, meaning no way to tell. */
> -
> - #define FRAME_NUM_ARGS(fi) (mips_frame_num_args(fi))
> - extern int mips_frame_num_args (struct frame_info *);
> -
> - /* Return number of bytes at start of arglist that are not really args. */
> -
> - #define FRAME_ARGS_SKIP 0
> -
> -
>
> /* Things needed for making the inferior call functions. */
>
> --- 189,194 ----
> Index: config/mips/tm-mipsv4.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/mips/tm-mipsv4.h,v
> retrieving revision 1.4
> diff -p -r1.4 tm-mipsv4.h
> *** config/mips/tm-mipsv4.h 5 Jun 2002 19:18:25 -0000 1.4
> --- config/mips/tm-mipsv4.h 20 Aug 2002 02:29:26 -0000
> ***************
> *** 33,40 ****
> #define SIGFRAME_PC_OFF (SIGFRAME_BASE + 40 + 35 * 4)
> #define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 40 + 36 * 4)
>
> - /* Use the alternate method of determining valid frame chains. */
> - #define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
> -
> /* Convert a DWARF register number to a gdb REGNUM. */
> #define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
> --- 33,37 ----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Further mips gdbarch-ification
2002-08-19 19:38 [PATCH] Further mips gdbarch-ification Michael Snyder
2002-08-19 19:42 ` Michael Snyder
@ 2002-08-20 12:41 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2002-08-20 12:41 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
Michael Snyder wrote:
>
> Arch-ify FRAME_CHAIN, FRAME_CHAIN_VALID, FRAMELESS_FUNCTION_INVOCATION,
> FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
> FRAME_NUM_ARGS, and FRAME_ARGS_SKIP.
>
> This patch is predicated on the previous patch, since gdbarch
> will give an internal error if these values are gdbarch-ified,
> but store_struct_return is not.
Committed.
> 2002-08-19 Michael Snyder <msnyder@redhat.com>
>
> * mips-tdep.c (mips_frame_num_args): New function.
> (mips_gdbarch_init): Set frame_chain, frameless_function_invocation,
> frame_saved_pc, frame_args_address, frame_locals_address,
> frame_num_args, and frame_args_skip.
> * config/mips/tm-mips.h (FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION,
> FRAME_SAVED_PC, FRAME_ARGS_ADDRESS, FRAME_LOCALS_ADDRESS,
> FRAME_NUM_ARGS, FRAME_ARGS_SKIP): Delete.
> * config/mips/tm-mipsv4.h (FRAME_CHAIN_VALID): Delete.
>
> Index: mips-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/mips-tdep.c,v
> retrieving revision 1.108
> diff -p -r1.108 mips-tdep.c
> *** mips-tdep.c 19 Aug 2002 23:22:17 -0000 1.108
> --- mips-tdep.c 20 Aug 2002 02:29:26 -0000
> *************** mips_do_registers_info (int regnum, int
> *** 4140,4154 ****
> }
> }
>
> - /* Return number of args passed to a frame. described by FIP.
> - Can return -1, meaning no way to tell. */
> -
> - int
> - mips_frame_num_args (struct frame_info *frame)
> - {
> - return -1;
> - }
> -
> /* Is this a branch with a delay slot? */
>
> static int is_delayed (unsigned long);
> --- 4140,4145 ----
> *************** mips_gdbarch_init (struct gdbarch_info i
> *** 5809,5815 ****
> --- 5800,5815 ----
>
> set_gdbarch_coerce_float_to_double (gdbarch, mips_coerce_float_to_double);
>
> + set_gdbarch_frame_chain (gdbarch, mips_frame_chain);
> set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);
> + set_gdbarch_frameless_function_invocation (gdbarch,
> + generic_frameless_function_invocation_not);
> + set_gdbarch_frame_saved_pc (gdbarch, mips_frame_saved_pc);
> + set_gdbarch_frame_args_address (gdbarch, default_frame_address);
> + set_gdbarch_frame_locals_address (gdbarch, default_frame_address);
> + set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
> + set_gdbarch_frame_args_skip (gdbarch, 0);
> +
> set_gdbarch_get_saved_register (gdbarch, mips_get_saved_register);
>
> set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
> Index: config/mips/tm-mips.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/mips/tm-mips.h,v
> retrieving revision 1.36
> diff -p -r1.36 tm-mips.h
> *** config/mips/tm-mips.h 18 Aug 2002 18:59:53 -0000 1.36
> --- config/mips/tm-mips.h 20 Aug 2002 02:29:26 -0000
> *************** extern void mips_register_convert_from_t
> *** 189,233 ****
> REGISTER_RAW_SIZE (V0_REGNUM)))
>
>
> - /* Describe the pointer in each stack frame to the previous stack frame
> - (its caller). */
> -
> - /* FRAME_CHAIN takes a frame's nominal address
> - and produces the frame's chain-pointer. */
> -
> - #define FRAME_CHAIN(thisframe) (CORE_ADDR) mips_frame_chain (thisframe)
> - extern CORE_ADDR mips_frame_chain (struct frame_info *);
> -
> - /* Define other aspects of the stack frame. */
> -
> -
> - /* A macro that tells us whether the function invocation represented
> - by FI does not have a frame on the stack associated with it. If it
> - does not, FRAMELESS is set to 1, else 0. */
> - /* We handle this differently for mips, and maybe we should not */
> -
> - #define FRAMELESS_FUNCTION_INVOCATION(FI) (0)
> -
> - /* Saved Pc. */
> -
> - #define FRAME_SAVED_PC(FRAME) (mips_frame_saved_pc(FRAME))
> - extern CORE_ADDR mips_frame_saved_pc (struct frame_info *);
> -
> - #define FRAME_ARGS_ADDRESS(fi) (fi)->frame
> -
> - #define FRAME_LOCALS_ADDRESS(fi) (fi)->frame
> -
> - /* Return number of args passed to a frame.
> - Can return -1, meaning no way to tell. */
> -
> - #define FRAME_NUM_ARGS(fi) (mips_frame_num_args(fi))
> - extern int mips_frame_num_args (struct frame_info *);
> -
> - /* Return number of bytes at start of arglist that are not really args. */
> -
> - #define FRAME_ARGS_SKIP 0
> -
> -
>
> /* Things needed for making the inferior call functions. */
>
> --- 189,194 ----
> Index: config/mips/tm-mipsv4.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/mips/tm-mipsv4.h,v
> retrieving revision 1.4
> diff -p -r1.4 tm-mipsv4.h
> *** config/mips/tm-mipsv4.h 5 Jun 2002 19:18:25 -0000 1.4
> --- config/mips/tm-mipsv4.h 20 Aug 2002 02:29:26 -0000
> ***************
> *** 33,40 ****
> #define SIGFRAME_PC_OFF (SIGFRAME_BASE + 40 + 35 * 4)
> #define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 40 + 36 * 4)
>
> - /* Use the alternate method of determining valid frame chains. */
> - #define FRAME_CHAIN_VALID(fp,fi) func_frame_chain_valid (fp, fi)
> -
> /* Convert a DWARF register number to a gdb REGNUM. */
> #define DWARF_REG_TO_REGNUM(num) ((num) < 32 ? (num) : (num)+FP0_REGNUM-32)
> --- 33,37 ----
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-08-20 19:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19 19:38 [PATCH] Further mips gdbarch-ification Michael Snyder
2002-08-19 19:42 ` Michael Snyder
2002-08-20 12:41 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox