From b05dcbb7f97fb8e8b1449a6bde96761b3cb3e39b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 10 Dec 2008 01:05:16 +0000 Subject: gdb PR gdb/1815: * cli/cli-decode.c (delete_cmd): Forward declare. (delete_cmd): Now static. Change return type. Remove command from alias chain. Rewrite. (add_cmd): Initialize new fields. Update cmd_pointer on all aliases. (add_alias_cmd): Put command on alias chain. * command.h (delete_cmd): Don't declare. * cli/cli-decode.h (delete_cmd): Don't declare. (struct cmd_list_element) : New fields. gdb/testsuite * gdb.base/commands.exp (redefine_backtrace_test): New proc. Call it. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/commands.exp | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) (limited to 'gdb/testsuite') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ab628c8..88cbff8b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-12-09 Tom Tromey + + * gdb.base/commands.exp (redefine_backtrace_test): New proc. + Call it. + 2008-12-04 Doug Evans * gdb.server/ext-run.exp: Relax regexp for init program. diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index 301b995..f6be3ea 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -692,6 +692,34 @@ proc if_commands_test {} { } } +proc redefine_backtrace_test {} { + global gdb_prompt + + gdb_test_multiple "define backtrace" "define backtrace" { + -re "Really redefine built-in.*$" { + send_gdb "y\n" + exp_continue + } + + -re "End with" { + pass "define backtrace in redefine_backtrace_test" + } + default { + fail "(timeout or eof) define backtrace in redefine_backtrace_test" + } + } + gdb_test "echo hibob\\n\nend" \ + "" \ + "enter commands in redefine_backtrace_test" + + gdb_test "backtrace" \ + "hibob" \ + "execute backtrace command in redefine_backtrace_test" + gdb_test "bt" \ + "hibob" \ + "execute bt command in redefine_backtrace_test" +} + gdbvar_simple_if_test gdbvar_simple_while_test gdbvar_complex_if_while_test @@ -710,3 +738,5 @@ temporary_breakpoint_commands stray_arg0_test recursive_source_test if_commands_test +# This one should come last, as it redefines "backtrace". +redefine_backtrace_test -- cgit v1.1