aboutsummaryrefslogtreecommitdiff
path: root/gdb/dcache.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-12-10 16:03:31 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-12-11 22:10:50 +0000
commit19c659f164b9dc672580ec459c9cfef84dd0f879 (patch)
treed04ecee3ab4fa36b055f2754dbc731cf7b3e21ac /gdb/dcache.c
parent44c77c32720c25f56a34ec4114c7addf5836ba97 (diff)
downloadgdb-19c659f164b9dc672580ec459c9cfef84dd0f879.zip
gdb-19c659f164b9dc672580ec459c9cfef84dd0f879.tar.gz
gdb-19c659f164b9dc672580ec459c9cfef84dd0f879.tar.bz2
gdb: improve the warning given for deprecated aliases with a prefix
Consider this GDB session: (gdb) define set xxx_yyy Type commands for definition of "set xxx_yyy". End with a line saying just "end". >echo in set xxx_yyy command\n >end (gdb) alias set qqq_aaa=set xxx_yyy (gdb) maintenance deprecate set qqq_aaa (gdb) set qqq_aaa Warning: 'qqq_aaa', an alias for the command 'xxx_yyy' is deprecated. No alternative known. in set xxx_yyy command (gdb) Notice the warning mentions 'qqq_aaa' and 'xxx_yyy', I consider this to be wrong. I think the proper warning should read: (gdb) set qqq_aaa Warning: 'set qqq_aaa', an alias for the command 'set xxx_yyy', is deprecated. No alternative known. With the 'set' prefixes added and a comma before the final 'is deprecated'. That is what this patch does. The expected results are updated as needed. gdb/ChangeLog: * cli/cli-decode.c (deprecated_cmd_warning): Ignore the prefix result from lookup_cmd_composition_1, use the prefixes from both the command and the alias instead. (lookup_cmd_composition_1): Initial prefix command is the based on the search list being passed in. Simplify the logic for tracking the prefix command. Replace a use of alloca with a local std::string. gdb/testsuite/ChangeLog: * gdb.base/commands.exp: Update expected results.
Diffstat (limited to 'gdb/dcache.c')
0 files changed, 0 insertions, 0 deletions