diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 23 | ||||
-rw-r--r-- | gdb/block.c | 1 | ||||
-rw-r--r-- | gdb/block.h | 13 | ||||
-rw-r--r-- | gdb/buildsym.c | 2 | ||||
-rw-r--r-- | gdb/cris-tdep.c | 2 | ||||
-rw-r--r-- | gdb/eval.c | 8 | ||||
-rw-r--r-- | gdb/gdbarch.c | 4 | ||||
-rw-r--r-- | gdb/gdbarch.h | 4 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/hppa-hpux-tdep.c | 2 | ||||
-rw-r--r-- | gdb/infcall.c | 21 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 4 | ||||
-rw-r--r-- | gdb/stack.c | 2 | ||||
-rw-r--r-- | gdb/symmisc.c | 2 | ||||
-rw-r--r-- | gdb/value.c | 5 | ||||
-rw-r--r-- | gdb/value.h | 2 |
16 files changed, 45 insertions, 52 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f809c7e..b9818af 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,28 @@ 2007-10-12 Ulrich Weigand <uweigand@de.ibm.com> + * block.h (struct block): Remove "gcc_compile_flag" member. + (BLOCK_GCC_COMPILED): Remove. + * block.c (allocate_block): Do not clear BLOCK_GCC_COMPILED. + * buildsym.c (finish_block): Do not set it. + * symmisc.c (dump_symtab_1): Do not dump it. + + * value.h (using_struct_return): Remove "gcc_p" argument. + * value.c (using_struct_return): Likewise. + * eval.c (evaluate_subexp_standard): Adapt callers. + * infcall.c (call_function_by_hand): Likewise. + * stack.c (return_command): Likewise. + * sparc-tdep.c (sparc32_push_dummy_code): Likewise. + + * gdbarch.sh (push_dummy_code): Remove "using_gcc" parameter. + * gdbarch.c, gdbarch.h: Regenerate. + * cris-tdep.c (cris_push_dummy_code): Adapt prototype. + * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise. + * sparc-tdep.c (sparc32_push_dummy_code): Likewise. + * infcall.c (generic_push_dummy_code, push_dummy_code): Likewise. + (push_dummy_code, call_function_by_hand): Adapt callers. + +2007-10-12 Ulrich Weigand <uweigand@de.ibm.com> + * infcmd.c (print_return_value): Remove STRUCT_RETURN argument. (finish_command_continuation, finish_command): Adapt callers. diff --git a/gdb/block.c b/gdb/block.c index f34c7c4..858d42d 100644 --- a/gdb/block.c +++ b/gdb/block.c @@ -287,7 +287,6 @@ allocate_block (struct obstack *obstack) BLOCK_SUPERBLOCK (bl) = NULL; BLOCK_DICT (bl) = NULL; BLOCK_NAMESPACE (bl) = NULL; - BLOCK_GCC_COMPILED (bl) = 0; return bl; } diff --git a/gdb/block.h b/gdb/block.h index 152a4fc..0b69f87 100644 --- a/gdb/block.h +++ b/gdb/block.h @@ -95,25 +95,12 @@ struct block cplus_specific; } language_specific; - - /* Version of GCC used to compile the function corresponding - to this block, or 0 if not compiled with GCC. When possible, - GCC should be compatible with the native compiler, or if that - is not feasible, the differences should be fixed during symbol - reading. As of 16 Apr 93, this flag is never used to distinguish - between gcc2 and the native compiler. - - If there is no function corresponding to this block, this meaning - of this flag is undefined. */ - - unsigned char gcc_compile_flag; }; #define BLOCK_START(bl) (bl)->startaddr #define BLOCK_END(bl) (bl)->endaddr #define BLOCK_FUNCTION(bl) (bl)->function #define BLOCK_SUPERBLOCK(bl) (bl)->superblock -#define BLOCK_GCC_COMPILED(bl) (bl)->gcc_compile_flag #define BLOCK_DICT(bl) (bl)->dict #define BLOCK_NAMESPACE(bl) (bl)->language_specific.cplus_specific.namespace diff --git a/gdb/buildsym.c b/gdb/buildsym.c index f640679..aab5056 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -246,8 +246,6 @@ finish_block (struct symbol *symbol, struct pending **listhead, BLOCK_SUPERBLOCK (block) = NULL; BLOCK_NAMESPACE (block) = NULL; - BLOCK_GCC_COMPILED (block) = processing_gcc_compilation; - /* Put the block in as the value of the symbol that names it. */ if (symbol) diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index a2999a5..a6dae9b 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -868,7 +868,7 @@ cris_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) static CORE_ADDR cris_push_dummy_code (struct gdbarch *gdbarch, - CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, + CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, @@ -760,7 +760,6 @@ evaluate_subexp_standard (struct type *expect_type, CORE_ADDR selector = 0; - int using_gcc = 0; int struct_return = 0; int sub_no_side = 0; @@ -912,9 +911,6 @@ evaluate_subexp_standard (struct type *expect_type, b = block_for_pc (funaddr); - /* If compiled without -g, assume GCC 2. */ - using_gcc = (b == NULL ? 2 : BLOCK_GCC_COMPILED (b)); - CHECK_TYPEDEF (value_type); if ((value_type == NULL) @@ -924,11 +920,11 @@ evaluate_subexp_standard (struct type *expect_type, value_type = expect_type; } - struct_return = using_struct_return (value_type, using_gcc); + struct_return = using_struct_return (value_type); } else if (expect_type != NULL) { - struct_return = using_struct_return (check_typedef (expect_type), using_gcc); + struct_return = using_struct_return (check_typedef (expect_type)); } /* Found a function symbol. Now we will substitute its diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index de6c50c..adf5674 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -1744,13 +1744,13 @@ gdbarch_push_dummy_code_p (struct gdbarch *gdbarch) } CORE_ADDR -gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache) +gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->push_dummy_code != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n"); - return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr, regcache); + return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache); } void diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index e24f2da..e3775d9 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -273,8 +273,8 @@ extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_d extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch); -typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache); -extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache); +typedef CORE_ADDR (gdbarch_push_dummy_code_ftype) (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache); +extern CORE_ADDR gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache); extern void set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, gdbarch_push_dummy_code_ftype *push_dummy_code); typedef void (gdbarch_print_registers_info_ftype) (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 6ad44f6..8a7597c 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -466,7 +466,7 @@ v::int:deprecated_fp_regnum:::-1:-1::0 # See gdbint.texinfo. See infcall.c. M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr v::int:call_dummy_location::::AT_ENTRY_POINT::0 -M::CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr, regcache +M::CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache:sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache m::void:print_registers_info:struct ui_file *file, struct frame_info *frame, int regnum, int all:file, frame, regnum, all::default_print_registers_info::0 M::void:print_float_info:struct ui_file *file, struct frame_info *frame, const char *args:file, frame, args diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index cf1c1d1..bbbd643 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -1093,7 +1093,7 @@ hppa_hpux_find_dummy_bpaddr (CORE_ADDR addr) static CORE_ADDR hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, - CORE_ADDR funcaddr, int using_gcc, + CORE_ADDR funcaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, diff --git a/gdb/infcall.c b/gdb/infcall.c index 2155796..99d3ccc 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -260,7 +260,7 @@ breakpoint_auto_delete_contents (void *arg) static CORE_ADDR generic_push_dummy_code (struct gdbarch *gdbarch, - CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, + CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, @@ -300,18 +300,18 @@ generic_push_dummy_code (struct gdbarch *gdbarch, static CORE_ADDR push_dummy_code (struct gdbarch *gdbarch, - CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, + CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache) { if (gdbarch_push_dummy_code_p (gdbarch)) - return gdbarch_push_dummy_code (gdbarch, sp, funaddr, using_gcc, + return gdbarch_push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache); else - return generic_push_dummy_code (gdbarch, sp, funaddr, using_gcc, + return generic_push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache); } @@ -347,7 +347,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) struct inferior_status *inf_status; struct cleanup *inf_status_cleanup; CORE_ADDR funaddr; - int using_gcc; /* Set to version of gcc in use, or zero if not gcc */ CORE_ADDR real_pc; struct type *ftype = check_typedef (value_type (function)); CORE_ADDR bp_addr; @@ -455,12 +454,6 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) funaddr = find_function_addr (function, &values_type); CHECK_TYPEDEF (values_type); - { - struct block *b = block_for_pc (funaddr); - /* If compiled without -g, assume GCC 2. */ - using_gcc = (b == NULL ? 2 : BLOCK_GCC_COMPILED (b)); - } - /* Are we returning a value using a structure return (passing a hidden argument pointing to storage) or a normal value return? There are two cases: language-mandated structure return and @@ -482,7 +475,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) } else { - struct_return = using_struct_return (values_type, using_gcc); + struct_return = using_struct_return (values_type); target_values_type = values_type; } @@ -503,7 +496,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) if (gdbarch_inner_than (current_gdbarch, 1, 2)) { sp = push_dummy_code (current_gdbarch, sp, funaddr, - using_gcc, args, nargs, target_values_type, + args, nargs, target_values_type, &real_pc, &bp_addr, get_current_regcache ()); dummy_addr = sp; } @@ -511,7 +504,7 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) { dummy_addr = sp; sp = push_dummy_code (current_gdbarch, sp, funaddr, - using_gcc, args, nargs, target_values_type, + args, nargs, target_values_type, &real_pc, &bp_addr, get_current_regcache ()); } break; diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 4324bc2..6f28385 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -378,7 +378,7 @@ sparc32_pseudo_register_write (struct gdbarch *gdbarch, static CORE_ADDR sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, - CORE_ADDR funcaddr, int using_gcc, + CORE_ADDR funcaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, @@ -387,7 +387,7 @@ sparc32_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, *bp_addr = sp - 4; *real_pc = funcaddr; - if (using_struct_return (value_type, using_gcc)) + if (using_struct_return (value_type)) { gdb_byte buf[4]; diff --git a/gdb/stack.c b/gdb/stack.c index 525b1d5..448135c 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -1805,7 +1805,7 @@ A structure or union return type is not supported by this architecture.\n\ If you continue, the return value that you specified will be ignored.\n"; return_value = NULL; } - else if (using_struct_return (return_type, 0)) + else if (using_struct_return (return_type)) { query_prefix = "\ The location at which to store the function's return value is unknown.\n\ diff --git a/gdb/symmisc.c b/gdb/symmisc.c index c1fbb0e..c49ab1f 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -508,8 +508,6 @@ dump_symtab_1 (struct objfile *objfile, struct symtab *symtab, SYMBOL_DEMANGLED_NAME (BLOCK_FUNCTION (b))); } } - if (BLOCK_GCC_COMPILED (b)) - fprintf_filtered (outfile, ", compiled with gcc%d", BLOCK_GCC_COMPILED (b)); fprintf_filtered (outfile, "\n"); /* Now print each symbol in this block (in no particular order, if we're using a hashtable). */ diff --git a/gdb/value.c b/gdb/value.c index 5f39bc8..656c5ea 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1709,11 +1709,10 @@ generic_use_struct_convention (int gcc_p, struct type *value_type) /* Return true if the function returning the specified type is using the convention of returning structures in memory (passing in the - address as a hidden first parameter). GCC_P is nonzero if compiled - with GCC. */ + address as a hidden first parameter). */ int -using_struct_return (struct type *value_type, int gcc_p) +using_struct_return (struct type *value_type) { enum type_code code = TYPE_CODE (value_type); diff --git a/gdb/value.h b/gdb/value.h index 37094d1..0824b5e 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -402,7 +402,7 @@ extern struct value *value_in (struct value *element, struct value *set); extern int value_bit_index (struct type *type, const gdb_byte *addr, int index); -extern int using_struct_return (struct type *value_type, int gcc_p); +extern int using_struct_return (struct type *value_type); extern struct value *evaluate_expression (struct expression *exp); |