mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-17 21:03:55 +08:00
* parse.c (write_exp_msymbol): Use new type msymbol_addr_type instead
of builtin_type_long. It is necessary to get a type which is TARGET_PTR_BIT bits in size; builtin_type_long might not be big enough.
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
Wed Jan 26 10:57:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Wed Jan 26 10:57:21 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* parse.c (write_exp_msymbol): Use new type msymbol_addr_type instead
|
||||||
|
of builtin_type_long. It is necessary to get a type which is
|
||||||
|
TARGET_PTR_BIT bits in size; builtin_type_long might not be big enough.
|
||||||
|
|
||||||
Fix many sins which will come up in 32 bit x 64 bit GDB, and
|
Fix many sins which will come up in 32 bit x 64 bit GDB, and
|
||||||
various miscellaneous things discovered in the process:
|
various miscellaneous things discovered in the process:
|
||||||
* printcmd.c, defs.h (print_address_numeric): New function.
|
* printcmd.c, defs.h (print_address_numeric): New function.
|
||||||
|
15
gdb/parse.c
15
gdb/parse.c
@ -1,5 +1,5 @@
|
|||||||
/* Parse expressions for GDB.
|
/* Parse expressions for GDB.
|
||||||
Copyright (C) 1986, 1989, 1990, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1986, 1989, 1990, 1991, 1994 Free Software Foundation, Inc.
|
||||||
Modified from expread.y by the Department of Computer Science at the
|
Modified from expread.y by the Department of Computer Science at the
|
||||||
State University of New York at Buffalo, 1991.
|
State University of New York at Buffalo, 1991.
|
||||||
|
|
||||||
@ -339,6 +339,10 @@ write_exp_bitstring (str)
|
|||||||
write_exp_elt_longcst ((LONGEST) bits);
|
write_exp_elt_longcst ((LONGEST) bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Type that corresponds to the address given in a minimal symbol. */
|
||||||
|
|
||||||
|
static struct type *msymbol_addr_type;
|
||||||
|
|
||||||
/* Add the appropriate elements for a minimal symbol to the end of
|
/* Add the appropriate elements for a minimal symbol to the end of
|
||||||
the expression. */
|
the expression. */
|
||||||
|
|
||||||
@ -349,7 +353,7 @@ write_exp_msymbol (msymbol, text_symbol_type, data_symbol_type)
|
|||||||
struct type *data_symbol_type;
|
struct type *data_symbol_type;
|
||||||
{
|
{
|
||||||
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_opcode (OP_LONG);
|
||||||
write_exp_elt_type (builtin_type_long);
|
write_exp_elt_type (msymbol_addr_type);
|
||||||
write_exp_elt_longcst ((LONGEST) SYMBOL_VALUE_ADDRESS (msymbol));
|
write_exp_elt_longcst ((LONGEST) SYMBOL_VALUE_ADDRESS (msymbol));
|
||||||
write_exp_elt_opcode (OP_LONG);
|
write_exp_elt_opcode (OP_LONG);
|
||||||
|
|
||||||
@ -860,4 +864,11 @@ _initialize_parse ()
|
|||||||
type_stack_depth = 0;
|
type_stack_depth = 0;
|
||||||
type_stack = (union type_stack_elt *)
|
type_stack = (union type_stack_elt *)
|
||||||
xmalloc (type_stack_size * sizeof (*type_stack));
|
xmalloc (type_stack_size * sizeof (*type_stack));
|
||||||
|
|
||||||
|
/* We don't worry too much about what the name of this type is
|
||||||
|
because the name should rarely appear in output to the user. */
|
||||||
|
|
||||||
|
msymbol_addr_type =
|
||||||
|
init_type (TYPE_CODE_PTR, TARGET_PTR_BIT / HOST_CHAR_BIT, 0,
|
||||||
|
"void *", NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user