mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-17 16:09:47 +00:00
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.
This commit is contained in:
parent
76e713237b
commit
4d1e7dd175
@ -1,3 +1,13 @@
|
||||
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
|
||||
|
@ -3634,7 +3634,7 @@ ensure_lval (struct value *val, CORE_ADDR *sp)
|
||||
/* 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. */
|
||||
|
@ -119,7 +119,7 @@ generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Helper functions for INNER_THAN */
|
||||
/* Helper functions for gdbarch_inner_than */
|
||||
|
||||
int
|
||||
core_addr_lessthan (CORE_ADDR lhs, CORE_ADDR rhs)
|
||||
|
@ -382,7 +382,7 @@ frame_id_inner (struct frame_id l, struct frame_id r)
|
||||
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=");
|
||||
|
@ -187,7 +187,7 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
|
||||
/* 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. */
|
||||
|
@ -1074,12 +1074,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
|
||||
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);
|
||||
|
@ -710,12 +710,6 @@ extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_pro
|
||||
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);
|
||||
|
@ -543,7 +543,7 @@ F:=:CORE_ADDR:deprecated_extract_struct_value_address:struct regcache *regcache:
|
||||
|
||||
#
|
||||
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
|
||||
|
@ -377,7 +377,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
|
||||
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);
|
||||
@ -405,15 +405,17 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
|
||||
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!
|
||||
@ -459,7 +461,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
|
||||
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,
|
||||
@ -606,7 +608,7 @@ You must use a pointer to function type variable. Command ignored."), arg_name);
|
||||
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;
|
||||
@ -641,7 +643,7 @@ You must use a pointer to function type variable. Command ignored."), arg_name);
|
||||
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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user