diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-11-20 19:08:06 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-12-13 12:36:15 +0000 |
commit | 50a5f1878e22b09ebea30ad60a2164b80af6efdb (patch) | |
tree | cd8cd90d92c67b71fa0b41da54d54543fbb49b7d /gdb/testsuite | |
parent | 7393df7f3fb404a605af9f2b9d4b8698c6fcc7df (diff) | |
download | fsf-binutils-gdb-50a5f1878e22b09ebea30ad60a2164b80af6efdb.zip fsf-binutils-gdb-50a5f1878e22b09ebea30ad60a2164b80af6efdb.tar.gz fsf-binutils-gdb-50a5f1878e22b09ebea30ad60a2164b80af6efdb.tar.bz2 |
gdb: introduce new 'maint flush ' prefix command
We currently have two flushing commands 'flushregs' and 'maint
flush-symbol-cache'. I'm planning to add at least one more so I
thought it might be nice if we bundled these together into one place.
And so I created the 'maint flush ' command prefix. Currently there
are two commands:
(gdb) maint flush symbol-cache
(gdb) maint flush register-cache
Unfortunately, even though both of the existing flush commands are
maintenance commands, I don't know how keen we about deleting existing
commands for fear of breaking things in the wild. So, both of the
existing flush commands 'maint flush-symbol-cache' and 'flushregs' are
still around as deprecated aliases to the new commands.
I've updated the testsuite to use the new command syntax, and updated
the documentation too.
gdb/ChangeLog:
* NEWS: Mention new commands, and that the old commands are now
deprecated.
* cli/cli-cmds.c (maintenanceflushlist): Define.
* cli/cli-cmds.h (maintenanceflushlist): Declare.
* maint.c (_initialize_maint_cmds): Initialise
maintenanceflushlist.
* regcache.c: Add 'cli/cli-cmds.h' include.
(reg_flush_command): Add header comment.
(_initialize_regcache): Create new 'maint flush register-cache'
command, make 'flushregs' an alias.
* symtab.c: Add 'cli/cli-cmds.h' include.
(_initialize_symtab): Create new 'maint flush symbol-cache'
command, make old command an alias.
gdb/doc/ChangeLog:
* gdb.texinfo (Symbols): Document 'maint flush symbol-cache'.
(Maintenance Commands): Document 'maint flush register-cache'.
gdb/testsuite/ChangeLog:
* gdb.base/c-linkage-name.exp: Update to use new 'maint flush ...'
commands.
* gdb.base/killed-outside.exp: Likewise.
* gdb.opt/inline-bt.exp: Likewise.
* gdb.perf/gmonster-null-lookup.py: Likewise.
* gdb.perf/gmonster-print-cerr.py: Likewise.
* gdb.perf/gmonster-ptype-string.py: Likewise.
* gdb.python/py-unwind.exp: Likewise.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/c-linkage-name.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/killed-outside.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.opt/inline-bt.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.perf/gmonster-null-lookup.py | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.perf/gmonster-print-cerr.py | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.perf/gmonster-ptype-string.py | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-unwind.exp | 2 |
8 files changed, 18 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5796e61..130de8a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2020-12-13 Andrew Burgess <andrew.burgess@embecosm.com> + + * gdb.base/c-linkage-name.exp: Update to use new 'maint flush ...' + commands. + * gdb.base/killed-outside.exp: Likewise. + * gdb.opt/inline-bt.exp: Likewise. + * gdb.perf/gmonster-null-lookup.py: Likewise. + * gdb.perf/gmonster-print-cerr.py: Likewise. + * gdb.perf/gmonster-ptype-string.py: Likewise. + * gdb.python/py-unwind.exp: Likewise. + 2020-12-11 Andrew Burgess <andrew.burgess@embecosm.com> * gdb.base/commands.exp: Update expected results. diff --git a/gdb/testsuite/gdb.base/c-linkage-name.exp b/gdb/testsuite/gdb.base/c-linkage-name.exp index 6b0a014..c6b3b50 100644 --- a/gdb/testsuite/gdb.base/c-linkage-name.exp +++ b/gdb/testsuite/gdb.base/c-linkage-name.exp @@ -64,7 +64,7 @@ gdb_test "maint info symtabs" "\{ symtab \[^\r\n\]*c-linkage-name-2.c.*" # Flush the symbol cache to prevent the lookup to return the same as before. -gdb_test "maint flush-symbol-cache" +gdb_test "maint flush symbol-cache" # Try to print MUNDANE using its linkage name again, after partial # symtab expansion. diff --git a/gdb/testsuite/gdb.base/killed-outside.exp b/gdb/testsuite/gdb.base/killed-outside.exp index 3e20ad6..645b41f 100644 --- a/gdb/testsuite/gdb.base/killed-outside.exp +++ b/gdb/testsuite/gdb.base/killed-outside.exp @@ -115,7 +115,7 @@ with_test_prefix "stepi" { # other commands would trigger. with_test_prefix "registers" { test { - gdb_test "flushregs" ".*" + gdb_test "maint flush register-cache" ".*" gdb_test "info threads" ".*" } } diff --git a/gdb/testsuite/gdb.opt/inline-bt.exp b/gdb/testsuite/gdb.opt/inline-bt.exp index d428c39..109627c 100644 --- a/gdb/testsuite/gdb.opt/inline-bt.exp +++ b/gdb/testsuite/gdb.opt/inline-bt.exp @@ -61,7 +61,7 @@ gdb_test "info frame" ".*inlined into frame.*" "func2 inlined (3)" # function. gdb_test_no_output "set backtrace limit 2" # Force flushing the frame cache. -gdb_test "flushregs" "Register cache flushed." +gdb_test "maint flush register-cache" "Register cache flushed." gdb_test "up" "#1 .*func1.*" "up from bar (4)" gdb_test "info frame" ".*in func1.*" "info frame still works" # Verify the user visible limit works as expected. diff --git a/gdb/testsuite/gdb.perf/gmonster-null-lookup.py b/gdb/testsuite/gdb.perf/gmonster-null-lookup.py index eaf4b11..f4ce1ea 100644 --- a/gdb/testsuite/gdb.perf/gmonster-null-lookup.py +++ b/gdb/testsuite/gdb.perf/gmonster-null-lookup.py @@ -40,7 +40,7 @@ class NullLookup(perftest.TestCaseWithBasicMeasurements): utils.safe_execute("mt expand-symtabs") iteration = 5 while iteration > 0: - utils.safe_execute("mt flush-symbol-cache") + utils.safe_execute("mt flush symbol-cache") func = lambda: utils.safe_execute("p symbol_not_found") self.measure.measure(func, run) iteration -= 1 diff --git a/gdb/testsuite/gdb.perf/gmonster-print-cerr.py b/gdb/testsuite/gdb.perf/gmonster-print-cerr.py index 796380d..adee2e6 100644 --- a/gdb/testsuite/gdb.perf/gmonster-print-cerr.py +++ b/gdb/testsuite/gdb.perf/gmonster-print-cerr.py @@ -46,7 +46,7 @@ class PrintCerr(perftest.TestCaseWithBasicMeasurements): utils.runto_main() iteration = 5 while iteration > 0: - utils.safe_execute("mt flush-symbol-cache") + utils.safe_execute("mt flush symbol-cache") func = lambda: utils.safe_execute("print gm_std::cerr") self.measure.measure(func, run) iteration -= 1 diff --git a/gdb/testsuite/gdb.perf/gmonster-ptype-string.py b/gdb/testsuite/gdb.perf/gmonster-ptype-string.py index 78fa3df..aa55135 100644 --- a/gdb/testsuite/gdb.perf/gmonster-ptype-string.py +++ b/gdb/testsuite/gdb.perf/gmonster-ptype-string.py @@ -41,7 +41,7 @@ class GmonsterPtypeString(perftest.TestCaseWithBasicMeasurements): utils.safe_execute("mt expand-symtabs") iteration = 5 while iteration > 0: - utils.safe_execute("mt flush-symbol-cache") + utils.safe_execute("mt flush symbol-cache") func1 = lambda: utils.safe_execute("ptype hello") func = lambda: utils.run_n_times(2, func1) self.measure.measure(func, run) diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp index 4ef63bf..e8ae863 100644 --- a/gdb/testsuite/gdb.python/py-unwind.exp +++ b/gdb/testsuite/gdb.python/py-unwind.exp @@ -57,4 +57,4 @@ gdb_test_sequence "where" "Backtrace restored by unwinder" { } # Check that the Python unwinder frames can be flushed / released. -gdb_test "flushregs" "Register cache flushed\\." "flush frames" +gdb_test "maint flush register-cache" "Register cache flushed\\." "flush frames" |