mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
gdb/
2010-07-21 Pedro Alves <pedro@codesourcery.com> PR symtab/11827 Revert: 2010-05-21 Pierre Muller <muller@ics.u-strasbg.fr> * dwarf2read.c (process_die): Also allow DW_TAG_const_type and DW_TAG_volatile_type. (new_symbol): Likewise. gdb/testsuite/ 2010-07-21 Pedro Alves <pedro@codesourcery.com> PR symtab/11827 * gdb.base/printcmds.c (enum some_volatile_enum): New enum. (some_volatile_enum): New variable. * gdb.base/printcmds.exp (test_print_enums): New. <top level>: Call it.
This commit is contained in:
@ -1,3 +1,13 @@
|
|||||||
|
2010-07-21 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
PR symtab/11827
|
||||||
|
|
||||||
|
Revert:
|
||||||
|
2010-05-21 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||||
|
* dwarf2read.c (process_die): Also allow DW_TAG_const_type
|
||||||
|
and DW_TAG_volatile_type.
|
||||||
|
(new_symbol): Likewise.
|
||||||
|
|
||||||
2010-07-21 Sami Wagiaalla <swagiaal@redhat.com>
|
2010-07-21 Sami Wagiaalla <swagiaal@redhat.com>
|
||||||
|
|
||||||
* eval.c (evaluate_subexp_standard): Disabled evaluation of C++
|
* eval.c (evaluate_subexp_standard): Disabled evaluation of C++
|
||||||
|
@ -4192,8 +4192,6 @@ process_die (struct die_info *die, struct dwarf2_cu *cu)
|
|||||||
case DW_TAG_base_type:
|
case DW_TAG_base_type:
|
||||||
case DW_TAG_subrange_type:
|
case DW_TAG_subrange_type:
|
||||||
case DW_TAG_typedef:
|
case DW_TAG_typedef:
|
||||||
case DW_TAG_const_type:
|
|
||||||
case DW_TAG_volatile_type:
|
|
||||||
/* Add a typedef symbol for the type definition, if it has a
|
/* Add a typedef symbol for the type definition, if it has a
|
||||||
DW_AT_name. */
|
DW_AT_name. */
|
||||||
new_symbol (die, read_type_die (die, cu), cu);
|
new_symbol (die, read_type_die (die, cu), cu);
|
||||||
@ -10001,8 +9999,6 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
|
|||||||
break;
|
break;
|
||||||
case DW_TAG_base_type:
|
case DW_TAG_base_type:
|
||||||
case DW_TAG_subrange_type:
|
case DW_TAG_subrange_type:
|
||||||
case DW_TAG_const_type:
|
|
||||||
case DW_TAG_volatile_type:
|
|
||||||
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
||||||
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
|
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
|
||||||
add_symbol_to_list (sym, cu->list_in_scope);
|
add_symbol_to_list (sym, cu->list_in_scope);
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2010-07-21 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
|
PR symtab/11827
|
||||||
|
|
||||||
|
* gdb.base/printcmds.c (enum some_volatile_enum): New enum.
|
||||||
|
(some_volatile_enum): New variable.
|
||||||
|
* gdb.base/printcmds.exp (test_print_enums): New.
|
||||||
|
<top level>: Call it.
|
||||||
|
|
||||||
2010-07-21 Sami Wagiaalla <swagiaal@redhat.com>
|
2010-07-21 Sami Wagiaalla <swagiaal@redhat.com>
|
||||||
|
|
||||||
* gdb.cp/fpointer.cc: New test.
|
* gdb.cp/fpointer.cc: New test.
|
||||||
|
@ -90,6 +90,12 @@ struct some_arrays {
|
|||||||
|
|
||||||
struct some_arrays *parrays = &arrays;
|
struct some_arrays *parrays = &arrays;
|
||||||
|
|
||||||
|
enum some_volatile_enum { enumvolval1, enumvolval2 };
|
||||||
|
|
||||||
|
/* A volatile enum variable whose name is the same as the enumeration
|
||||||
|
name. See PR11827. */
|
||||||
|
volatile enum some_volatile_enum some_volatile_enum = enumvolval1;
|
||||||
|
|
||||||
/* -- */
|
/* -- */
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
|
@ -671,6 +671,11 @@ proc test_print_array_constants {} {
|
|||||||
gdb_test "print *&{4,5,6}\[1\]" "Attempt to take address of value not located in memory."
|
gdb_test "print *&{4,5,6}\[1\]" "Attempt to take address of value not located in memory."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc test_print_enums {} {
|
||||||
|
# Regression test for PR11827.
|
||||||
|
gdb_test "print some_volatile_enum" "enumvolval1"
|
||||||
|
}
|
||||||
|
|
||||||
proc test_printf {} {
|
proc test_printf {} {
|
||||||
gdb_test "printf \"x=%d,y=%d,z=%d\\n\", 5, 6, 7" "x=5,y=6,z=7"
|
gdb_test "printf \"x=%d,y=%d,z=%d\\n\", 5, 6, 7" "x=5,y=6,z=7"
|
||||||
gdb_test "printf \"string=%.4sxx\\n\", teststring" "string=testxx"
|
gdb_test "printf \"string=%.4sxx\\n\", teststring" "string=testxx"
|
||||||
@ -800,6 +805,7 @@ if [set_lang_c] then {
|
|||||||
# We used to do the runto main here.
|
# We used to do the runto main here.
|
||||||
test_print_string_constants
|
test_print_string_constants
|
||||||
test_print_array_constants
|
test_print_array_constants
|
||||||
|
test_print_enums
|
||||||
test_printf
|
test_printf
|
||||||
test_printf_with_dfp
|
test_printf_with_dfp
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user