aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/ChangeLog
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-04-29 11:39:36 +0200
committerTom de Vries <tdevries@suse.de>2020-04-29 11:39:36 +0200
commitea90f2278cee318976c66bf82284046214fb30af (patch)
tree016ad147ad97cb9efb07c21e0b1dca952a676b34 /gdb/testsuite/ChangeLog
parent03549f57b6c664aecb4f67b2f5fa44488ea92066 (diff)
downloadgdb-ea90f2278cee318976c66bf82284046214fb30af.zip
gdb-ea90f2278cee318976c66bf82284046214fb30af.tar.gz
gdb-ea90f2278cee318976c66bf82284046214fb30af.tar.bz2
[gdb] Fix range loop index in find_method
With target board debug-types, we have: ... FAIL: gdb.cp/cpexprs.exp: list policy1::function ... This is a regression triggered by commit 770479f223e "gdb: Fix toplevel types with -fdebug-types-section". However, the FAIL is caused by commit 4dedf84da98 "Change decode_compound_collector to use std::vector" which changes a VEC_iterate loop into a range loop: ... - for (ix = 0; VEC_iterate (symbolp, sym_classes, ix, sym); ++ix) + unsigned int ix = 0; + for (const auto &sym : *sym_classes) ... but fails to ensure that the increment of ix happens every iteration. Fix this by calculating the index variable at the start of the loop body: ... for (const auto &elt : *sym_classes) { unsigned int ix = &elt - &*sym_classes->begin (); ... Tested on x86_64-linux, with native and target board debug-types. gdb/ChangeLog: 2020-04-29 Tom de Vries <tdevries@suse.de> PR symtab/25889 * linespec.c (find_method): Fix ix calculation. gdb/testsuite/ChangeLog: 2020-04-29 Tom de Vries <tdevries@suse.de> PR symtab/25889 * gdb.cp/cpexprs.exp: Adapt for inclusion. * gdb.cp/cpexprs-debug-types.exp: New file. Set -fdebug-types-section and include cpexprs.exp.
Diffstat (limited to 'gdb/testsuite/ChangeLog')
-rw-r--r--gdb/testsuite/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 129b969..761fe30 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2020-04-29 Tom de Vries <tdevries@suse.de>
+
+ PR symtab/25889
+ * gdb.cp/cpexprs.exp: Adapt for inclusion.
+ * gdb.cp/cpexprs-debug-types.exp: New file. Set -fdebug-types-section
+ and include cpexprs.exp.
+
2020-04-28 Mark Williams <mark@myosotissp.com>
PR gdb/24480