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.
This commit is contained in:
Jan Kratochvil 2012-09-21 18:53:15 +00:00
parent 1c5b7826c5
commit 9bf4bce984
4 changed files with 31 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-09-21 Jan Kratochvil <jan.kratochvil@redhat.com>
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 <tromey@redhat.com>
* c-typeprint.c (c_type_print_base) <TYPE_CODE_STRUCT,

View File

@ -1091,7 +1091,7 @@ disassemble_current_function (int flags)
frame = get_selected_frame (_("No frame selected."));
gdbarch = get_frame_arch (frame);
pc = get_frame_pc (frame);
pc = get_frame_address_in_block (frame);
if (find_pc_partial_function (pc, &name, &low, &high) == 0)
error (_("No function contains program counter for selected frame."));
#if defined(TUI)

View File

@ -1,3 +1,8 @@
2012-09-21 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix disassemble without parameters in tailcall frame.
* gdb.arch/amd64-entry-value.exp (down, disassemble): New tests.
2012-09-21 Andrew Burgess <aburgess@broadcom.com>
* gdb.dwarf2/dw2-op-out-param.S: New file.

View File

@ -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.