diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:23:51 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-09-11 14:23:51 +0000 |
commit | 5ed92fa89a78886c28ecf48a5debdd6a1513bdbf (patch) | |
tree | 03611b078d6603cec33b0177744b162e7286f7f6 /gdb/objc-lang.c | |
parent | 0dfff4cba79b63947da409e72b2863b160a6233a (diff) | |
download | gdb-5ed92fa89a78886c28ecf48a5debdd6a1513bdbf.zip gdb-5ed92fa89a78886c28ecf48a5debdd6a1513bdbf.tar.gz gdb-5ed92fa89a78886c28ecf48a5debdd6a1513bdbf.tar.bz2 |
* stack.c (return_command): Use frame architecture to determine
default integer return type.
* f-valprint.c (f77_get_dynamic_lowerbound): Use frame architecture
to determine pointer types.
(f77_get_dynamic_upperbound): Likewise.
* objc-lang.c (OBJC_FETCH_POINTER_ARGUMENT): Remove.
(resolve_msgsend): Use architecture of current frame to determine
pointer types. Inline OBJC_FETCH_POINTER_ARGUMENT.
(resolve_msgsend_stret, resolve_msgsend_super,
resolve_msgsend_super_stret): Likewise.
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r-- | gdb/objc-lang.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 7dea97e..0ff2ebc 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -1679,19 +1679,19 @@ find_implementation (CORE_ADDR object, CORE_ADDR sel) return find_implementation_from_class (ostr.isa, sel); } -#define OBJC_FETCH_POINTER_ARGUMENT(argi) \ - gdbarch_fetch_pointer_argument (current_gdbarch, get_current_frame (), \ - argi, builtin_type_void_func_ptr) - static int resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc) { + struct frame_info *frame = get_current_frame (); + struct gdbarch *gdbarch = get_frame_arch (frame); + struct type *ptr_type = builtin_type (gdbarch)->builtin_func_ptr; + CORE_ADDR object; CORE_ADDR sel; CORE_ADDR res; - object = OBJC_FETCH_POINTER_ARGUMENT (0); - sel = OBJC_FETCH_POINTER_ARGUMENT (1); + object = gdbarch_fetch_pointer_argument (gdbarch, frame, 0, ptr_type); + sel = gdbarch_fetch_pointer_argument (gdbarch, frame, 1, ptr_type); res = find_implementation (object, sel); if (new_pc != 0) @@ -1704,12 +1704,16 @@ resolve_msgsend (CORE_ADDR pc, CORE_ADDR *new_pc) static int resolve_msgsend_stret (CORE_ADDR pc, CORE_ADDR *new_pc) { + struct frame_info *frame = get_current_frame (); + struct gdbarch *gdbarch = get_frame_arch (frame); + struct type *ptr_type = builtin_type (gdbarch)->builtin_func_ptr; + CORE_ADDR object; CORE_ADDR sel; CORE_ADDR res; - object = OBJC_FETCH_POINTER_ARGUMENT (1); - sel = OBJC_FETCH_POINTER_ARGUMENT (2); + object = gdbarch_fetch_pointer_argument (gdbarch, frame, 1, ptr_type); + sel = gdbarch_fetch_pointer_argument (gdbarch, frame, 2, ptr_type); res = find_implementation (object, sel); if (new_pc != 0) @@ -1722,14 +1726,18 @@ resolve_msgsend_stret (CORE_ADDR pc, CORE_ADDR *new_pc) static int resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc) { + struct frame_info *frame = get_current_frame (); + struct gdbarch *gdbarch = get_frame_arch (frame); + struct type *ptr_type = builtin_type (gdbarch)->builtin_func_ptr; + struct objc_super sstr; CORE_ADDR super; CORE_ADDR sel; CORE_ADDR res; - super = OBJC_FETCH_POINTER_ARGUMENT (0); - sel = OBJC_FETCH_POINTER_ARGUMENT (1); + super = gdbarch_fetch_pointer_argument (gdbarch, frame, 0, ptr_type); + sel = gdbarch_fetch_pointer_argument (gdbarch, frame, 1, ptr_type); read_objc_super (super, &sstr); if (sstr.class == 0) @@ -1746,14 +1754,18 @@ resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc) static int resolve_msgsend_super_stret (CORE_ADDR pc, CORE_ADDR *new_pc) { + struct frame_info *frame = get_current_frame (); + struct gdbarch *gdbarch = get_frame_arch (frame); + struct type *ptr_type = builtin_type (gdbarch)->builtin_func_ptr; + struct objc_super sstr; CORE_ADDR super; CORE_ADDR sel; CORE_ADDR res; - super = OBJC_FETCH_POINTER_ARGUMENT (1); - sel = OBJC_FETCH_POINTER_ARGUMENT (2); + super = gdbarch_fetch_pointer_argument (gdbarch, frame, 1, ptr_type); + sel = gdbarch_fetch_pointer_argument (gdbarch, frame, 2, ptr_type); read_objc_super (super, &sstr); if (sstr.class == 0) |