* 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.
This commit is contained in:
parent
8f536afe35
commit
82585c7265
16 changed files with 45 additions and 52 deletions
|
@ -1,3 +1,26 @@
|
|||
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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
13
gdb/block.h
13
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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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\
|
||||
|
|
|
@ -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). */
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue