2017-01-01 14:50:51 +08:00
|
|
|
# Copyright 1999-2017 Free Software Foundation, Inc.
|
2000-02-23 08:25:43 +08:00
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-08-24 02:14:19 +08:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2000-02-23 08:25:43 +08:00
|
|
|
# (at your option) any later version.
|
2007-08-24 02:14:19 +08:00
|
|
|
#
|
2000-02-23 08:25:43 +08:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2007-08-24 02:14:19 +08:00
|
|
|
#
|
2000-02-23 08:25:43 +08:00
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-08-24 02:14:19 +08:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2000-02-23 08:25:43 +08:00
|
|
|
|
2013-02-13 00:36:07 +08:00
|
|
|
# Test Machine interface (MI) operations
|
2000-02-23 08:25:43 +08:00
|
|
|
#
|
2013-02-13 00:36:07 +08:00
|
|
|
# Test MI watchpoint commands.
|
2000-02-23 08:25:43 +08:00
|
|
|
#
|
2013-02-13 00:36:07 +08:00
|
|
|
# The goal is not to test gdb functionality, which is done by other
|
|
|
|
# tests, but to verify the correct output response to MI operations.
|
2000-02-23 08:25:43 +08:00
|
|
|
|
|
|
|
load_lib mi-support.exp
|
2001-06-19 01:57:43 +08:00
|
|
|
set MIFLAGS "-i=mi"
|
2000-02-23 08:25:43 +08:00
|
|
|
|
|
|
|
gdb_exit
|
|
|
|
|
2012-07-10 23:32:52 +08:00
|
|
|
standard_testfile basics.c
|
|
|
|
|
gdb/testsuite:
* gdb.mi/gdb2549.exp: Remove -DFAKEARGV from compilation flags.
* gdb.mi/mi-async.exp, gdb.mi/mi-basics.exp: Likewise.
* gdb.mi/mi-break.exp, gdb.mi/mi-cli.exp: Likewise.
* gdb.mi/mi-console.exp, gdb.mi/mi-disassemble.exp: Likewise.
* gdb.mi/mi-eval.exp, gdb.mi/mi-file.exp: Likewise.
* gdb.mi/mi-read-memory.exp, gdb.mi/mi-regs.exp: Likewise.
* gdb.mi/mi-return.exp, gdb.mi/mi-reverse.exp: Likewise.
* gdb.mi/mi-simplerun.exp, gdb.mi/mi-stack.exp: Likewise.
* gdb.mi/mi-stepi.exp, gdb.mi/mi-syn-frame.exp: Likewise.
* gdb.mi/mi-until.exp, gdb.mi/mi-var-block.exp: Likewise.
* gdb.mi/mi-var-child.exp, gdb.mi/mi-var-cmd.exp: Likewise.
* gdb.mi/mi-var-display.exp: Likewise.
* gdb.mi/mi-var-invalidate.exp: Likewise.
* gdb.mi/mi-watch.exp, gdb.mi/mi2-basics.exp: Likewise.
* gdb.mi/mi2-break.exp, gdb.mi/mi2-cli.exp: Likewise.
* gdb.mi/mi2-console.exp: Likewise.
* gdb.mi/mi2-disassemble.exp: Likewise.
* gdb.mi/mi2-eval.exp, gdb.mi/mi2-file.exp: Likewise.
* gdb.mi/mi2-read-memory.exp: Likewise.
* gdb.mi/mi2-regs.exp, gdb.mi/mi2-return.exp: Likewise.
* gdb.mi/mi2-simplerun.exp: Likewise.
* gdb.mi/mi2-stack.exp, gdb.mi/mi2-stepi.exp: Likewise.
* gdb.mi/mi2-syn-frame.exp: Likewise.
* gdb.mi/mi2-until.exp, gdb.mi/mi2-var-block.exp: Likewise.
* gdb.mi/mi2-var-child.exp, gdb.mi/mi2-var-cmd.exp: Likewise.
* gdb.mi/mi2-var-display.exp, gdb.mi/mi2-watch.exp: Likewise.
2012-07-10 02:28:17 +08:00
|
|
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
2016-12-24 00:52:18 +08:00
|
|
|
untested "failed to compile"
|
2006-08-10 13:27:22 +08:00
|
|
|
return -1
|
2000-02-23 08:25:43 +08:00
|
|
|
}
|
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
proc test_watchpoint_creation_and_listing {} {
|
2000-02-23 08:25:43 +08:00
|
|
|
global mi_gdb_prompt
|
|
|
|
global srcfile
|
|
|
|
global hex
|
|
|
|
|
2004-08-15 18:15:58 +08:00
|
|
|
set line_callee4_head [gdb_get_line_number "callee4 ("]
|
|
|
|
set line_callee4_body [expr $line_callee4_head + 2]
|
|
|
|
|
2000-02-23 08:25:43 +08:00
|
|
|
# Insert a watchpoint and list
|
|
|
|
# Tests:
|
|
|
|
# -break-watch C
|
|
|
|
# -break-list
|
|
|
|
|
|
|
|
mi_gdb_test "111-break-watch C" \
|
|
|
|
"111\\^done,wpt=\{number=\"2\",exp=\"C\"\}" \
|
|
|
|
"break-watch operation"
|
|
|
|
|
|
|
|
mi_gdb_test "222-break-list" \
|
2013-01-22 07:58:00 +08:00
|
|
|
"222\\\^done,BreakpointTable=\{nr_rows=\".\",nr_cols=\".\",hdr=\\\[\{width=\".*\",alignment=\".*\",col_name=\"number\",colhdr=\"Num\"\}.*colhdr=\"Type\".*colhdr=\"Disp\".*colhdr=\"Enb\".*colhdr=\"Address\".*colhdr=\"What\".*\\\],body=\\\[bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",what=\"C\",thread-groups=\\\[\"i1\"\\\],times=\"0\",original-location=\"C\"\}\\\]\}" \
|
2000-02-23 08:25:43 +08:00
|
|
|
"list of watchpoints"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
# UNUSED at the time
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
proc test_awatch_creation_and_listing {} {
|
2000-02-23 08:25:43 +08:00
|
|
|
global mi_gdb_prompt
|
|
|
|
global srcfile
|
|
|
|
global hex
|
|
|
|
|
2004-08-15 18:15:58 +08:00
|
|
|
set line_main_head [gdb_get_line_number "main ("]
|
|
|
|
set line_main_body [expr $line_main_head + 2]
|
|
|
|
|
2000-02-23 08:25:43 +08:00
|
|
|
# Insert an access watchpoint and list it
|
|
|
|
# Tests:
|
|
|
|
# -break-watch -a A
|
|
|
|
# -break-list
|
|
|
|
|
|
|
|
mi_gdb_test "333-break-watch -a A" \
|
2004-08-15 18:15:58 +08:00
|
|
|
"333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"$line_main_body\"\}" \
|
2000-02-23 08:25:43 +08:00
|
|
|
"break-watch -a operation"
|
|
|
|
|
|
|
|
mi_gdb_test "444-break-list" \
|
2013-01-22 07:58:00 +08:00
|
|
|
"444\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"3\",type=\"watchpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",thread-groups=\\\[\"i1\"\\\],times=\"0\"\},.*\}\\\]\}" \
|
2000-02-23 08:25:43 +08:00
|
|
|
"list of watchpoints awatch"
|
|
|
|
|
|
|
|
mi_gdb_test "777-break-delete 3" \
|
|
|
|
"777\\^done" \
|
|
|
|
"delete access watchpoint"
|
|
|
|
}
|
|
|
|
|
|
|
|
# UNUSED at the time
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
proc test_rwatch_creation_and_listing {} {
|
2000-02-23 08:25:43 +08:00
|
|
|
global mi_gdb_prompt
|
|
|
|
global srcfile
|
|
|
|
global hex
|
|
|
|
|
2004-08-15 18:15:58 +08:00
|
|
|
set line_main_head [gdb_get_line_number "main ("]
|
|
|
|
set line_main_body [expr $line_main_head + 2]
|
|
|
|
|
2000-02-23 08:25:43 +08:00
|
|
|
# Insert a read watchpoint and list it.
|
|
|
|
# Tests:
|
2012-11-09 10:30:49 +08:00
|
|
|
# -break-watch -r B
|
2000-02-23 08:25:43 +08:00
|
|
|
# -break-list
|
|
|
|
|
|
|
|
mi_gdb_test "200-break-watch -r C" \
|
2004-08-15 18:15:58 +08:00
|
|
|
"200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"$line_main_body\",times=\"0\"\}" \
|
2012-11-09 10:30:49 +08:00
|
|
|
"break-watch -r operation"
|
2000-02-23 08:25:43 +08:00
|
|
|
|
|
|
|
mi_gdb_test "300-break-list" \
|
2013-01-22 07:58:00 +08:00
|
|
|
"300\\^done,BreakpointTable=\{.*,hdr=\\\[.*\\\],body=\\\[bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"$line_main_body\",thread-groups=\\\[\"i1\"\\\],times=\"0\"\},.*\}\\\}\}" \
|
2000-02-23 08:25:43 +08:00
|
|
|
"list of breakpoints"
|
|
|
|
|
|
|
|
mi_gdb_test "177-break-delete 4" \
|
|
|
|
"177\\^done" \
|
|
|
|
"delete read watchpoint"
|
|
|
|
}
|
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
proc test_watchpoint_triggering {} {
|
2000-02-23 08:25:43 +08:00
|
|
|
global mi_gdb_prompt
|
2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
Dennis Brueni <dennis@slickedit.com>
gdb/
* stack.c (print_frame): In MI mode, output a fullname attribute
with the stack frame.
gdb/doc/
* gdb.texinfo (GDB/MI Breakpoint Table Commands)
(GDB/MI Data Manipulation, GDB/MI Program Control)
(GDB/MI Stack Manipulation): Update examples to include the fullname
attribute in stack frames.
gdb/testsuite/
* gdb.mi/mi-cli.exp, gdb.mi/mi-return.exp, gdb.mi/mi-stack.exp,
gdb.mi/mi-stepi.exp, gdb.mi/mi-syn-frame.exp, gdb.mi/mi-until.exp,
gdb.mi/mi-var-display.exp, gdb.mi/mi-watch.exp, gdb.mi/mi2-cli.exp,
gdb.mi/mi2-return.exp, gdb.mi/mi2-stack.exp,
gdb.mi/mi2-syn-frame.exp, gdb.mi/mi2-until.exp,
gdb.mi/mi2-var-display.exp: Expect fullname field in stack frames.
* lib/mi-support.exp (mi_runto, mi_execute_to_helper): Likewise.
2005-05-18 11:41:59 +08:00
|
|
|
global hex fullname_syntax srcfile
|
2000-02-23 08:25:43 +08:00
|
|
|
|
2004-08-15 18:15:58 +08:00
|
|
|
set line_callee4_return_0 [gdb_get_line_number "return 0;"]
|
|
|
|
set line_callee3_head [gdb_get_line_number "callee3 ("]
|
|
|
|
set line_callee3_close_brace [expr $line_callee3_head + 3]
|
|
|
|
|
2000-02-23 08:25:43 +08:00
|
|
|
# Continue execution until the watchpoint is reached, continue again,
|
|
|
|
# to see the watchpoint go out of scope.
|
|
|
|
# Does:
|
|
|
|
# -exec-continue (Here wp triggers)
|
|
|
|
# -exec-continue (Here wp goes out of scope)
|
|
|
|
|
2008-04-06 01:12:46 +08:00
|
|
|
mi_execute_to "exec-continue" "watchpoint-trigger" "callee4" "" \
|
|
|
|
".*basics.c" $line_callee4_return_0 \
|
|
|
|
{"" "wpt=\{number=\"2\",exp=\"C\"\},value=\{old=\".*\",new=\"3\"\}"} \
|
|
|
|
"watchpoint trigger"
|
2000-02-23 08:25:43 +08:00
|
|
|
|
2008-04-06 01:12:46 +08:00
|
|
|
mi_execute_to "exec-continue" "watchpoint-scope" "callee3" ".*" \
|
|
|
|
".*basics.c" $line_callee3_close_brace \
|
|
|
|
{"" "wpnum=\"2\""} \
|
|
|
|
"watchpoint trigger"
|
2000-02-23 08:25:43 +08:00
|
|
|
}
|
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
proc test_watchpoint_all {mi_mode type} {
|
|
|
|
upvar srcdir srcdir
|
|
|
|
upvar subdir subdir
|
|
|
|
upvar binfile binfile
|
|
|
|
|
|
|
|
if {$type == "hw" && [target_info exists gdb,no_hardware_watchpoints] } {
|
|
|
|
return
|
2013-03-15 09:41:29 +08:00
|
|
|
}
|
2007-09-15 01:21:29 +08:00
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
mi_gdb_exit
|
2007-09-15 01:21:29 +08:00
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
if {$mi_mode == "separate"} {
|
|
|
|
set start_ops "separate-mi-tty"
|
|
|
|
} else {
|
|
|
|
set start_ops ""
|
|
|
|
}
|
|
|
|
if [mi_gdb_start $start_ops] {
|
|
|
|
return
|
|
|
|
}
|
2007-09-15 01:21:29 +08:00
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
if {$type == "sw"} {
|
|
|
|
set option 0
|
|
|
|
} else {
|
|
|
|
set option 1
|
|
|
|
}
|
|
|
|
mi_gdb_test "567-gdb-set can-use-hw-watchpoints $option" \
|
|
|
|
"567\\^done" \
|
|
|
|
"hw watchpoints toggle"
|
2007-09-07 07:25:41 +08:00
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
mi_delete_breakpoints
|
|
|
|
mi_gdb_reinitialize_dir $srcdir/$subdir
|
|
|
|
mi_gdb_load ${binfile}
|
2007-09-15 01:21:29 +08:00
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
mi_runto callee4
|
|
|
|
test_watchpoint_creation_and_listing
|
|
|
|
#test_rwatch_creation_and_listing
|
|
|
|
#test_awatch_creation_and_listing
|
|
|
|
test_watchpoint_triggering
|
|
|
|
}
|
2000-02-23 08:25:43 +08:00
|
|
|
|
Send deleted watchpoint-scope output to all UIs
Testing with:
make check RUNTESTFLAGS="SEPARATE_MI_TTY=1"
shows this, in gdb.mi/mi-watch.exp:
-*stopped,reason="watchpoint-scope",wpnum="2",frame={addr="0x00000000004005cb",
+*stopped,frame={addr="0x00000000004005cb",
(...)
-PASS: gdb.mi/mi-watch.exp: hw: watchpoint trigger
+FAIL: gdb.mi/mi-watch.exp: hw: watchpoint trigger (unknown output after running)
That is, we lose the "watchpoint-scope" output on the MI UI.
This commit fixes it, and makes the test run with MI running as both
main UI and separate UI.
gdb/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* breakpoint.c (watchpoint_check): Send watchpoint-deleted output
to all UIs.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.mi/mi-watch.exp (test_watchpoint_creation_and_listing)
(test_awatch_creation_and_listing)
(test_rwatch_creation_and_listing, test_watchpoint_triggering):
Remove 'type' parameter.
(test_watchpoint_all): New parameter mi_mode. Remove
with_test_prefix.
(top level): Use foreach_with_prefix, and add main/separate UI MI
testing axis.
2016-06-21 08:11:56 +08:00
|
|
|
# Run the tests twice, once using software watchpoints, and another
|
|
|
|
# with hardware watchpoints.
|
|
|
|
foreach_with_prefix mi-mode {"main" "separate"} {
|
|
|
|
foreach_with_prefix wp-type {"sw" "hw"} {
|
|
|
|
test_watchpoint_all ${mi-mode} ${wp-type}
|
|
|
|
}
|
|
|
|
}
|