diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-04-15 14:02:15 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-04-17 13:35:22 +0100 |
commit | 7a59cf956369336eb9346196a85976e4042019f5 (patch) | |
tree | 32d5efcc90f67f1fb60e805568b229e701ceb485 /ld/scripttempl/elf32crx.sc | |
parent | 6e4f0b3ea0d49c4fd11002a8074eb49e7838b4b2 (diff) | |
download | gdb-7a59cf956369336eb9346196a85976e4042019f5.zip gdb-7a59cf956369336eb9346196a85976e4042019f5.tar.gz gdb-7a59cf956369336eb9346196a85976e4042019f5.tar.bz2 |
gdb/record: minor clean, remove some unneeded arguments
I spotted that the two functions:
record_full_open_1
record_full_core_open_1
both took two arguments, neither of which are used.
I stumbled onto this while reviewing how filename_completer is used.
The 'record full restore' command uses filename_completer and invokes
the cmd_record_full_restore function.
The cmd_record_full_restore function calls core_file_command and then
record_full_open, which then calls one of the above functions.
As 'record full restore' takes a filename, this is passed to
cmd_record_full_restore, which forwards the filename to both
core_file_command and record_full_open. However, record_full_open
never actually uses the filename that is passed in.
The record_full_open function is also used for 'target record-full'.
I propose that record_full_open should no longer expect to see any
user supplied arguments passed in (it doesn't use any). In fact, I've
added a check that if we do get any user supplied arguments we'll
throw an error.
Now that we know record_full_open isn't being passed any user
arguments we can stop passing the arguments to record_full_open_1 and
record_full_core_open_1, this will make no user visible difference as
these arguments were not used.
It is possible that a user was previously doing:
(gdb) target record-full blah blah blah
And this previously would work fine, the 'blah blah blah' was
ignored. Now this will give an error. Other than this case there
should be no user visible changes after this commit.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'ld/scripttempl/elf32crx.sc')
0 files changed, 0 insertions, 0 deletions