diff options
author | Joel Brobecker <brobecker@gnat.com> | 2010-01-12 05:49:00 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2010-01-12 05:49:00 +0000 |
commit | b4ba55a1812c4bde23d52111e54d2b72a1ec4af1 (patch) | |
tree | b84c1cfcfebf30685854b3e01f7553ce70ac6bfc /gdb/testsuite | |
parent | cc761f759cdb2966648d33c92f85c6e6e3e5da82 (diff) | |
download | gdb-b4ba55a1812c4bde23d52111e54d2b72a1ec4af1.zip gdb-b4ba55a1812c4bde23d52111e54d2b72a1ec4af1.tar.gz gdb-b4ba55a1812c4bde23d52111e54d2b72a1ec4af1.tar.bz2 |
gdb/ChangeLog:
Add support for DW_AT_GNAT_descriptive_type.
* gdbtypes.h (enum type_specific_kind): New enum.
(struct main_type) [type_specific_field]: New component.
[type_specific]: Add new component "gnat_stuff".
(struct gnat_aux_type): New type.
(INIT_CPLUS_SPECIFIC): Also set TYPE_SPECIFIC_FIELD (type).
(HAVE_CPLUS_STRUCT): Also check TYPE_SPECIFIC_FIELD (type).
(gnat_aux_default, allocate_gnat_aux_type): Add declaration.
(INIT_GNAT_SPECIFIC, ALLOCATE_GNAT_AUX_TYPE, HAVE_GNAT_AUX_INFO)
(TYPE_SPECIFIC_FIELD): New macros.
(TYPE_CPLUS_SPECIFIC): Return cplus_struct_default if the given
type does not hold any cplus-specific data.
(TYPE_RAW_CPLUS_SPECIFIC): New macro.
(TYPE_GNAT_SPECIFIC, TYPE_DESCRIPTIVE_TYPE): New macros.
(TYPE_IS_OPAQUE): Use HAVE_CPLUS_STRUCT to check if type has
cplus-specific data.
* gdbtypes.c (allocate_cplus_struct_type): Minor stylistic rewrite.
Set new component TYPE_SPECIFIC_FIELD (type).
(gnat_aux_default): New constant.
(allocate_gnat_aux_type): New function.
(init_type): Add initialization the type-specific stuff for
TYPE_CODE_FLT and TYPE_CODE_FUNC types.
(print_gnat_stuff): New function.
(recursive_dump_type): Use HAVE_CPLUS_STRUCT to check for cplus-
specific data. Adjust code that prints the contents of the
type-specific union using the TYPE_SPECIFIC_FIELD value.
* dwarf2read.c (dwarf2_attach_fields_to_type): Do not allocate
the type cplus stuff for Ada types.
(dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
Error out if these routines are called with an Ada type.
(read_structure_type, read_array_type, read_subrange_type):
Add call to set_descriptive_type.
(set_die_type): Initialize the gnat-specific data if necessary.
(need_gnat_info, die_descriptive_type, set_descriptive_type):
New functions.
* ada-lang.c (decode_constrained_packed_array_type): Use
decode_constrained_packed_array_type instead of doing a standard
lookup to locate a parallel type.
(find_parallel_type_by_descriptive_type): New function.
(ada_find_parallel_type_with_name): New function.
(ada_find_parallel_type): Reimplement using
ada_find_parallel_type_with_name.
* ada-valprint.c (print_field_values): Use HAVE_CPLUS_STRUCT
to check if type has a cplus stuff.
* linespec.c (total_number_of_methods): Likewise.
* mdebugread.c (new_type): Likewise.
gdb/testsuite/ChangeLog:
* gdb.base/maint.exp: Adjust the expected output for the
"maint print type" test. Use gdb_test_multiple instead of
gdb_sent/gdb_expect.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/maint.exp | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ae6fda9..789043f 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-01-12 Joel Brobecker <brobecker@adacore.com> + + * gdb.base/maint.exp: Adjust the expected output for the + "maint print type" test. Use gdb_test_multiple instead of + gdb_sent/gdb_expect. + 2010-01-11 Doug Evans <dje@google.com> * lib/gdbserver-support.exp (gdbserver_download_current_prog): Rename diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index 45d2a73..6cff013 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -397,13 +397,12 @@ gdb_expect { timeout { fail "(timeout) maint print symbols" } } -send_gdb "maint print type argc\n" -gdb_expect { - -re "type node $hex\r\nname .int. \\($hex\\)\r\ntagname .<NULL>. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength \[24\]\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\ntype_chain $hex\r\ninstance_flags $hex\r\nflags\r\nnfields 0 $hex\r\nvptr_basetype $hex\r\nvptr_fieldno -1\r\ntype_specific $hex\r\n$gdb_prompt $"\ - { pass "maint print type" } - -re ".*$gdb_prompt $" { fail "maint print type" } - timeout { fail "(timeout) maint print type" } - } +set msg "maint print type" +gdb_test_multiple "maint print type argc" $msg { + -re "type node $hex\r\nname .int. \\($hex\\)\r\ntagname .<NULL>. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength \[24\]\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\ntype_chain $hex\r\ninstance_flags $hex\r\nflags\r\nnfields 0 $hex\r\nvptr_basetype $hex\r\nvptr_fieldno -1\r\n$gdb_prompt $" { + pass $msg + } +} if [istarget "hppa*-*-11*"] { setup_xfail hppa*-*-*11* CLLbs14860 |