diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-06 15:26:28 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-06 15:26:28 +0000 |
commit | 4d1e7dd175a53ab96cccf4539cef4576af758ddc (patch) | |
tree | 09f89c936198bbe260ea7d879aa9f3f71081870a /gdb | |
parent | 76e713237b3bb87b52b7716262a63fefd4a7f0bf (diff) | |
download | fsf-binutils-gdb-4d1e7dd175a53ab96cccf4539cef4576af758ddc.zip fsf-binutils-gdb-4d1e7dd175a53ab96cccf4539cef4576af758ddc.tar.gz fsf-binutils-gdb-4d1e7dd175a53ab96cccf4539cef4576af758ddc.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/ada-lang.c | 2 | ||||
-rw-r--r-- | gdb/arch-utils.c | 2 | ||||
-rw-r--r-- | gdb/frame.c | 2 | ||||
-rw-r--r-- | gdb/gcore.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch.c | 6 | ||||
-rw-r--r-- | gdb/gdbarch.h | 6 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/infcall.c | 16 |
9 files changed, 24 insertions, 24 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2034513..f45089d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,15 @@ 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 gdbarch_address_to_pointer. * findvar.c (store_typed_address): Likewise. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 134768f..f79f727 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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. */ diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index e267457..3a02350 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -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) diff --git a/gdb/frame.c b/gdb/frame.c index d066a49..6365462 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -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="); diff --git a/gdb/gcore.c b/gdb/gcore.c index 46d2aac..21280bb 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -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. */ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 5c95bbe..94eeae7 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -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); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 42ef4b2..6771c0a 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -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); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 774c8d6..b147f54 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -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 diff --git a/gdb/infcall.c b/gdb/infcall.c index 25e25ad..5bd2ce3 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -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. */ |