(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>
+
+ * 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.
BLOCK_SUPERBLOCK (bl) = NULL;
BLOCK_DICT (bl) = NULL;
BLOCK_NAMESPACE (bl) = NULL;
- BLOCK_GCC_COMPILED (bl) = 0;
return bl;
}
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
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)
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,
CORE_ADDR selector = 0;
- int using_gcc = 0;
int struct_return = 0;
int sub_no_side = 0;
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)
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
}
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
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);
# 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
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,
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,
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);
}
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;
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
}
else
{
- struct_return = using_struct_return (values_type, using_gcc);
+ struct_return = using_struct_return (values_type);
target_values_type = values_type;
}
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;
}
{
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;
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,
*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];
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\
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). */
/* 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);
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);