aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-09-10 14:48:30 -0600
committerTom Tromey <tom@tromey.com>2017-09-11 15:46:14 -0600
commitcb791d59489576280e416262eb61ab59765a0baf (patch)
tree16a968a28a8926f82e69990be93b5f86dec81ae3 /gdb/testsuite
parent2039bd9f0ce667f3f0ee99c18e25de1ea18a2288 (diff)
downloadgdb-cb791d59489576280e416262eb61ab59765a0baf.zip
gdb-cb791d59489576280e416262eb61ab59765a0baf.tar.gz
gdb-cb791d59489576280e416262eb61ab59765a0baf.tar.bz2
Make extract_arg return a std::string
Change extract_arg to return a std::string and fix up all the users. I think string is mildly better than unique_xmalloc_ptr<char>, when possible, because it provides a more robust API. I changed the error messages emitted from find_location_by_number to avoid either writing to a string or an extra allocation; this can be changed but I thought that the new message was not any less clear. You can see an example in the testsuite patch. ChangeLog 2017-09-11 Tom Tromey <tom@tromey.com> * demangle.c (demangle_command): Update. * breakpoint.c (disable_command): Update. (enable_command): Update. (find_location_by_number): Make "number" const. Use get_number_trailer. * cli/cli-utils.c (extract_arg): Return std::string. * probe.c (parse_probe_linespec): Update. Change types. (collect_probes): Take string arguments. (parse_probe_linespec): Likewise. (info_probes_for_ops): Update. (enable_probes_command): Update. (disable_probes_command): Update. * break-catch-sig.c (catch_signal_split_args): Update. * mi/mi-parse.c (mi_parse): Update. testsuite/ChangeLog 2017-09-11 Tom Tromey <tom@tromey.com> * gdb.base/ena-dis-br.exp (test_ena_dis_br): Update test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/ena-dis-br.exp2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3862a7c..2726d46 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2017-09-11 Tom Tromey <tom@tromey.com>
+ * gdb.base/ena-dis-br.exp (test_ena_dis_br): Update test.
+
+2017-09-11 Tom Tromey <tom@tromey.com>
+
* gdb.python/py-infthread.exp: Add tests for new_thread event.
* gdb.python/py-inferior.exp: Add tests for new inferior events.
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
index 8abca35..d407408 100644
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
@@ -369,7 +369,7 @@ proc test_ena_dis_br { what } {
# Now enable(disable) $b1 fooo.1, it should give error on fooo.
gdb_test "$what $b1 fooo.1" \
- "Bad breakpoint number 'fooo'" \
+ "Bad breakpoint number 'fooo\\.1'" \
"$what \$b1 fooo.1"
# $b1 should be enabled(disabled).