* gdbarch.sh (INNER_THAN): Replace by gdbarch_inner_than.
* infcall.c (call_function_by_hand): Likewise.
* gcore.c (derive_stack_segment): Likewise.
* frame.c (frame_id_inner): Likewise.
* arch-utils.c (core_addr_lessthan): Likewise (comment).
* ada-lang.c (ensure_lval): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
+2007-06-06 Markus Deuling <deuling@de.ibm.com>
+
+ * gdbarch.sh (INNER_THAN): Replace by gdbarch_inner_than.
+ * infcall.c (call_function_by_hand): Likewise.
+ * gcore.c (derive_stack_segment): Likewise.
+ * frame.c (frame_id_inner): Likewise.
+ * arch-utils.c (core_addr_lessthan): Likewise (comment).
+ * ada-lang.c (ensure_lval): Likewise.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
2007-06-06 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (ADDRESS_TO_POINTER): Replace by
/* The following is taken from the structure-return code in
call_function_by_hand. FIXME: Therefore, some refactoring seems
indicated. */
- if (INNER_THAN (1, 2))
+ if (gdbarch_inner_than (current_gdbarch, 1, 2))
{
/* Stack grows downward. Align SP and VALUE_ADDRESS (val) after
reserving sufficient space. */
return 0;
}
-/* Helper functions for INNER_THAN */
+/* Helper functions for gdbarch_inner_than */
int
core_addr_lessthan (CORE_ADDR lhs, CORE_ADDR rhs)
comment in "frame.h", there is some fuzz here. Frameless
functions are not strictly inner than (same .stack but
different .code and/or .special address). */
- inner = INNER_THAN (l.stack_addr, r.stack_addr);
+ inner = gdbarch_inner_than (current_gdbarch, l.stack_addr, r.stack_addr);
if (frame_debug)
{
fprintf_unfiltered (gdb_stdlog, "{ frame_id_inner (l=");
/* Save frame pointer of TOS frame. */
*top = get_frame_base (fi);
/* If current stack pointer is more "inner", use that instead. */
- if (INNER_THAN (get_frame_sp (fi), *top))
+ if (gdbarch_inner_than (current_gdbarch, get_frame_sp (fi), *top))
*top = get_frame_sp (fi);
/* Find prev-most frame. */
fprintf_unfiltered (file,
"gdbarch_dump: in_solib_return_trampoline = <0x%lx>\n",
(long) current_gdbarch->in_solib_return_trampoline);
-#ifdef INNER_THAN
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "INNER_THAN(lhs, rhs)",
- XSTRING (INNER_THAN (lhs, rhs)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: inner_than = <0x%lx>\n",
(long) current_gdbarch->inner_than);
typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
-#if !defined (GDB_TM_FILE) && defined (INNER_THAN)
-#error "Non multi-arch definition of INNER_THAN"
-#endif
-#if !defined (INNER_THAN)
-#define INNER_THAN(lhs, rhs) (gdbarch_inner_than (current_gdbarch, lhs, rhs))
-#endif
typedef const gdb_byte * (gdbarch_breakpoint_from_pc_ftype) (CORE_ADDR *pcptr, int *lenptr);
extern const gdb_byte * gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr);
#
f:=:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
-f:=:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
+f::int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs:0:0
f:=:const gdb_byte *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr::0:
M::CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr
f:=:int:memory_insert_breakpoint:struct bp_target_info *bp_tgt:bp_tgt:0:default_memory_insert_breakpoint::0
address. AMD64 called that region the "red zone". Skip at
least the "red zone" size before allocating any space on
the stack. */
- if (INNER_THAN (1, 2))
+ if (gdbarch_inner_than (current_gdbarch, 1, 2))
sp -= gdbarch_frame_red_zone_size (current_gdbarch);
else
sp += gdbarch_frame_red_zone_size (current_gdbarch);
to pay :-). */
if (sp == old_sp)
{
- if (INNER_THAN (1, 2))
+ if (gdbarch_inner_than (current_gdbarch, 1, 2))
/* Stack grows down. */
sp = gdbarch_frame_align (current_gdbarch, old_sp - 1);
else
/* Stack grows up. */
sp = gdbarch_frame_align (current_gdbarch, old_sp + 1);
}
- gdb_assert ((INNER_THAN (1, 2) && sp <= old_sp)
- || (INNER_THAN (2, 1) && sp >= old_sp));
+ gdb_assert ((gdbarch_inner_than (current_gdbarch, 1, 2)
+ && sp <= old_sp)
+ || (gdbarch_inner_than (current_gdbarch, 2, 1)
+ && sp >= old_sp));
}
else
/* FIXME: cagney/2002-09-18: Hey, you loose!
case ON_STACK:
/* "dummy_addr" is here just to keep old targets happy. New
targets return that same information via "sp" and "bp_addr". */
- if (INNER_THAN (1, 2))
+ if (gdbarch_inner_than (current_gdbarch, 1, 2))
{
sp = push_dummy_code (current_gdbarch, sp, funaddr,
using_gcc, args, nargs, values_type,
len = TYPE_LENGTH (arg_type);
aligned_len = len;
- if (INNER_THAN (1, 2))
+ if (gdbarch_inner_than (current_gdbarch, 1, 2))
{
/* stack grows downward */
sp -= aligned_len;
if (struct_return)
{
int len = TYPE_LENGTH (values_type);
- if (INNER_THAN (1, 2))
+ if (gdbarch_inner_than (current_gdbarch, 1, 2))
{
/* Stack grows downward. Align STRUCT_ADDR and SP after
making space for the return value. */