From 9bf4bce9847504467f8af7e3c7886cce1794dbad Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 21 Sep 2012 18:53:15 +0000 Subject: [PATCH] gdb/ Fix disassemble without parameters in tailcall frame. * cli/cli-cmds.c (disassemble_current_function): Use get_frame_address_in_block. gdb/testsuite/ Fix disassemble without parameters in tailcall frame. * gdb.arch/amd64-entry-value.exp (down, disassemble): New tests. --- gdb/ChangeLog | 6 ++++++ gdb/cli/cli-cmds.c | 2 +- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.arch/amd64-entry-value.exp | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7aba5e8b8b4..31454abcb50 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-09-21 Jan Kratochvil + + Fix disassemble without parameters in tailcall frame. + * cli/cli-cmds.c (disassemble_current_function): Use + get_frame_address_in_block. + 2012-09-21 Tom Tromey * c-typeprint.c (c_type_print_base) + + Fix disassemble without parameters in tailcall frame. + * gdb.arch/amd64-entry-value.exp (down, disassemble): New tests. + 2012-09-21 Andrew Burgess * gdb.dwarf2/dw2-op-out-param.S: New file. diff --git a/gdb/testsuite/gdb.arch/amd64-entry-value.exp b/gdb/testsuite/gdb.arch/amd64-entry-value.exp index dd22d42f619..455b7a7331d 100644 --- a/gdb/testsuite/gdb.arch/amd64-entry-value.exp +++ b/gdb/testsuite/gdb.arch/amd64-entry-value.exp @@ -213,6 +213,25 @@ gdb_test {p $sp0 == $sp} " = true" gdb_test "frame 3" "\r\n#3 .*" gdb_test {p $sp0 + sizeof (void *) == $sp} " = true" +# Test $pc adjustment which is now right after the function end. +# Also verify the current PC indicator "=> " is not displayed anywhere. +gdb_test "down" "\r\n#2 .*" +set test "disassemble" +gdb_test_multiple $test $test { + -re "^$test\r\n" { + exp_continue + } + -re "^Dump of assembler code for function b\\(int, double\\):\r\n" { + exp_continue + } + -re "^ 0x\[^\r\n\]*\r\n" { + exp_continue + } + -re "^End of assembler dump\\.\r\n$gdb_prompt $" { + pass $test + } +} + # Test partial-ambiguous virtual tail call frames chain. -- 2.30.2