diff options
author | Doug Evans <dje@google.com> | 2013-09-04 23:05:32 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-09-04 23:05:32 +0000 |
commit | 89e63ee47a55271506d68f24b25a4a2094ab346f (patch) | |
tree | 789f9e3cf3fab8f723af987820f6cc934a0b28a5 /gdb/testsuite | |
parent | 492c0ab72a050a19d09d0df16eb3b0d8da22be1a (diff) | |
download | gdb-89e63ee47a55271506d68f24b25a4a2094ab346f.zip gdb-89e63ee47a55271506d68f24b25a4a2094ab346f.tar.gz gdb-89e63ee47a55271506d68f24b25a4a2094ab346f.tar.bz2 |
* dwarf2read.c (queue_and_load_all_dwo_tus): New function.
(queue_and_load_dwo_tu): New function.
(lookup_dwo_signatured_type): Set per_cu.tu_read.
(maybe_queue_comp_unit): Rename this_cu argument to dependent_cu.
Make dependent_cu optional.
(dw2_do_instantiate_symtab): If we just loaded a CU from a DWO,
and an older .gdb_index is in use, queue and load all its TUs too.
testsuite/
* gdb.base/enumval.c (ZERO): New enum value.
(main): Use it
* gdb.base/enumval.exp: Test ability to print ZERO.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/enumval.c | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/enumval.exp | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 62d26d2..cfa5590 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,10 @@ -2013-09-13 Muhammad Bilal <mbilal@codesourcery.com> +2013-09-04 Doug Evans <dje@google.com> + + * gdb.base/enumval.c (ZERO): New enum value. + (main): Use it + * gdb.base/enumval.exp: Test ability to print ZERO. + +2013-09-03 Muhammad Bilal <mbilal@codesourcery.com> Pedro Alves <palves@redhat.com> * gdb.base/relocate.exp: Check that invalid options are diff --git a/gdb/testsuite/gdb.base/enumval.c b/gdb/testsuite/gdb.base/enumval.c index 13e081a..44d4fd0 100644 --- a/gdb/testsuite/gdb.base/enumval.c +++ b/gdb/testsuite/gdb.base/enumval.c @@ -17,6 +17,8 @@ enum e { I, J = 0xffffffffU, K = 0xf000000000000000ULL } e = J, f = K; +enum { ZERO }; + void dummy() { @@ -26,5 +28,5 @@ int main(void) { dummy(); - return 0; + return ZERO; /* This is here to ensure it survives into the debug info. */ } diff --git a/gdb/testsuite/gdb.base/enumval.exp b/gdb/testsuite/gdb.base/enumval.exp index e0964fc..93e6752 100644 --- a/gdb/testsuite/gdb.base/enumval.exp +++ b/gdb/testsuite/gdb.base/enumval.exp @@ -70,3 +70,9 @@ gdb_test_multiple $test $test { } } } + +# gold/15021 +# With -fdebug-types-section, Gold's .gdb_index entry for ZERO refers to the +# CU, but the CU doesn't use the TU (type unit) that defines ZERO. +# Thus gdb has to read in every TU for the CU. +gdb_test "p ZERO" "ZERO" |