mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
gdb/testsuite/: Use "-qualified" in explicit "break main", etc.
Similar to the previous patch, but this time add "-q" to tests that do "break main", "list main", etc. explicitly. gdb/testsuite/ChangeLog: * config/monitor.exp: Use "list -q". * gdb.arch/gdb1558.exp: Use "break -q". * gdb.arch/i386-permbkpt.exp: Use "break -q". * gdb.arch/i386-prologue-skip-cf-protection.exp: Use "break -q". * gdb.base/break.exp: Use "break -q", "list -q" and "tbreak -q". * gdb.base/commands.exp: Use "break -q". * gdb.base/condbreak.exp: Use "break -q". * gdb.base/ctf-ptype.exp: Use "list -q". * gdb.base/define.exp: Use "break -q". * gdb.base/del.exp: Use "break -q". * gdb.base/fullname.exp: Use "break -q". * gdb.base/hbreak-in-shr-unsupported.exp: Use "hbreak -q". * gdb.base/hbreak-unmapped.exp: Use "hbreak -q". * gdb.base/hbreak2.exp: Use "hbreak -q" and "list -q". * gdb.base/hw-sw-break-same-address.exp: Use "break -q" and "hbreak -q". * gdb.base/included.exp: Use "list -q". * gdb.base/label.exp: Use "break -q". * gdb.base/lineinc.exp: Use "break -q". * gdb.base/list.exp: Use "list -q". * gdb.base/macscp.exp: Use "list -q". * gdb.base/pending.exp: Use "break -q". * gdb.base/prologue-include.exp: Use "break -q". * gdb.base/ptype.exp: Use "list -q". * gdb.base/sepdebug.exp: Use "break -q", "list -q" and "tbreak -q". * gdb.base/server-del-break.exp: Use "break -q". * gdb.base/style.exp: Use "break -q". * gdb.base/symbol-without-target_section.exp: Use "list -q". * gdb.base/watchpoint-reuse-slot.exp: Use "hbreak -q". * gdb.cp/exception.exp: Use "tbreak -q". * gdb.dwarf2/dw2-error.exp: Use "break -q". * gdb.dwarf2/fission-mix.exp: Use "break -q". * gdb.dwarf2/fission-reread.exp: Use "break -q". * gdb.dwarf2/pr13961.exp: Use "break -q". * gdb.linespec/explicit.exp: Use "list -q". * gdb.linespec/linespec.exp: Use "break -q". * gdb.mi/mi-simplerun.exp: Use "--qualified". * gdb.python/py-mi-objfile-gdb.py: Use "list -q". * gdb.server/bkpt-other-inferior.exp: Use "break -q". * gdb.server/connect-without-multi-process.exp: Use "break -q". * gdb.trace/change-loc.exp: Use "break -q". * gdb.trace/pending.exp: Use "break -q". * gdb.tui/basic.exp: Use "list -q". * gdb.tui/list-before.exp: Use "list -q". * gdb.tui/list.exp: Use "list -q". * lib/gdb.exp (gdb_has_argv0): Use "break -q". Change-Id: Iab9408e90ed71cbb111cd737d2d81b5ba8adb108
This commit is contained in:
parent
8abd8ee8c8
commit
e777225bfd
@ -1,3 +1,52 @@
|
||||
2020-10-13 Pedro Alves <pedro@palves.net>
|
||||
|
||||
* config/monitor.exp: Use "list -q".
|
||||
* gdb.arch/gdb1558.exp: Use "break -q".
|
||||
* gdb.arch/i386-permbkpt.exp: Use "break -q".
|
||||
* gdb.arch/i386-prologue-skip-cf-protection.exp: Use "break -q".
|
||||
* gdb.base/break.exp: Use "break -q", "list -q" and "tbreak -q".
|
||||
* gdb.base/commands.exp: Use "break -q".
|
||||
* gdb.base/condbreak.exp: Use "break -q".
|
||||
* gdb.base/ctf-ptype.exp: Use "list -q".
|
||||
* gdb.base/define.exp: Use "break -q".
|
||||
* gdb.base/del.exp: Use "break -q".
|
||||
* gdb.base/fullname.exp: Use "break -q".
|
||||
* gdb.base/hbreak-in-shr-unsupported.exp: Use "hbreak -q".
|
||||
* gdb.base/hbreak-unmapped.exp: Use "hbreak -q".
|
||||
* gdb.base/hbreak2.exp: Use "hbreak -q" and "list -q".
|
||||
* gdb.base/hw-sw-break-same-address.exp: Use "break -q" and
|
||||
"hbreak -q".
|
||||
* gdb.base/included.exp: Use "list -q".
|
||||
* gdb.base/label.exp: Use "break -q".
|
||||
* gdb.base/lineinc.exp: Use "break -q".
|
||||
* gdb.base/list.exp: Use "list -q".
|
||||
* gdb.base/macscp.exp: Use "list -q".
|
||||
* gdb.base/pending.exp: Use "break -q".
|
||||
* gdb.base/prologue-include.exp: Use "break -q".
|
||||
* gdb.base/ptype.exp: Use "list -q".
|
||||
* gdb.base/sepdebug.exp: Use "break -q", "list -q" and "tbreak -q".
|
||||
* gdb.base/server-del-break.exp: Use "break -q".
|
||||
* gdb.base/style.exp: Use "break -q".
|
||||
* gdb.base/symbol-without-target_section.exp: Use "list -q".
|
||||
* gdb.base/watchpoint-reuse-slot.exp: Use "hbreak -q".
|
||||
* gdb.cp/exception.exp: Use "tbreak -q".
|
||||
* gdb.dwarf2/dw2-error.exp: Use "break -q".
|
||||
* gdb.dwarf2/fission-mix.exp: Use "break -q".
|
||||
* gdb.dwarf2/fission-reread.exp: Use "break -q".
|
||||
* gdb.dwarf2/pr13961.exp: Use "break -q".
|
||||
* gdb.linespec/explicit.exp: Use "list -q".
|
||||
* gdb.linespec/linespec.exp: Use "break -q".
|
||||
* gdb.mi/mi-simplerun.exp: Use "--qualified".
|
||||
* gdb.python/py-mi-objfile-gdb.py: Use "list -q".
|
||||
* gdb.server/bkpt-other-inferior.exp: Use "break -q".
|
||||
* gdb.server/connect-without-multi-process.exp: Use "break -q".
|
||||
* gdb.trace/change-loc.exp: Use "break -q".
|
||||
* gdb.trace/pending.exp: Use "break -q".
|
||||
* gdb.tui/basic.exp: Use "list -q".
|
||||
* gdb.tui/list-before.exp: Use "list -q".
|
||||
* gdb.tui/list.exp: Use "list -q".
|
||||
* lib/gdb.exp (gdb_has_argv0): Use "break -q".
|
||||
|
||||
2020-10-13 Pedro Alves <pedro@palves.net>
|
||||
|
||||
* gdb.base/ui-redirect.exp: Expect "break -qualified main" in
|
||||
|
@ -169,7 +169,7 @@ proc gdb_load { arg } {
|
||||
}
|
||||
if { $state == "pass" } {
|
||||
if [gdb_target_monitor $arg] { return -1 }
|
||||
gdb_test "list main" ".*" ""
|
||||
gdb_test "list -q main" ".*" ""
|
||||
verbose "Loaded $arg into $GDB\n"
|
||||
return 0
|
||||
}
|
||||
|
@ -41,9 +41,9 @@ gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
gdb_test "b main" "Breakpoint 1.*" "set breakpoint at main"
|
||||
gdb_test "b sub1" "Breakpoint 2.*" "set breakpoint at sub1"
|
||||
gdb_test "b sub2" "Breakpoint 3.*" "set breakpoint at sub2"
|
||||
gdb_test "b -q main" "Breakpoint 1.*" "set breakpoint at main"
|
||||
gdb_test "b -q sub1" "Breakpoint 2.*" "set breakpoint at sub1"
|
||||
gdb_test "b -q sub2" "Breakpoint 3.*" "set breakpoint at sub2"
|
||||
|
||||
# We can't use "runto_main" because that is exactly the problem
|
||||
# we are trying to detect, stopping somewhere before main.
|
||||
|
@ -35,5 +35,5 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test "break main" "" "first permanent break"
|
||||
gdb_test "break main" "" "second permanent break"
|
||||
gdb_test "break -q main" "" "first permanent break"
|
||||
gdb_test "break -q main" "" "second permanent break"
|
||||
|
@ -48,7 +48,7 @@ gdb_assert {$main_addr != -1}
|
||||
set bp_addr -1
|
||||
|
||||
# Put breakpoint on main, get the address where the breakpoint was installed.
|
||||
gdb_test_multiple "break main" "break on main, get address" {
|
||||
gdb_test_multiple "break -q main" "break on main, get address" {
|
||||
-re -wrap "Breakpoint $decimal at ($hex).*" {
|
||||
set bp_addr $expect_out(1,string)
|
||||
|
||||
|
@ -47,7 +47,7 @@ gdb_expect {
|
||||
#
|
||||
# test break at function
|
||||
#
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
|
||||
@ -76,7 +76,7 @@ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
# it's wherever the processor was stopped when we connected to the
|
||||
# board. So, to be sure, we do a list command.
|
||||
#
|
||||
gdb_test "list main" \
|
||||
gdb_test "list -q main" \
|
||||
".*main \\(int argc, char \\*\\*argv, char \\*\\*envp\\).*" \
|
||||
"use `list' to establish default source file"
|
||||
gdb_test "break $bp_location1" \
|
||||
@ -426,7 +426,7 @@ delete_breakpoints
|
||||
# test temporary breakpoint at function
|
||||
#
|
||||
|
||||
gdb_test "tbreak main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
|
||||
gdb_test "tbreak -q main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
|
||||
|
||||
#
|
||||
# test break at function in file
|
||||
@ -759,7 +759,7 @@ if { [prepare_for_testing "failed to prepare" "breako2" {break.c break1.c} {debu
|
||||
#
|
||||
# test break at function
|
||||
#
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*, line.*" \
|
||||
"breakpoint function, optimized file"
|
||||
|
||||
|
@ -289,7 +289,7 @@ proc_with_prefix breakpoint_clear_command_test {} {
|
||||
delete_breakpoints
|
||||
gdb_test "break factorial" "Breakpoint.*at.*"
|
||||
gdb_test_no_output "set \$bpnumfactorial = \$bpnum"
|
||||
gdb_test "break main" "Breakpoint.*at.*"
|
||||
gdb_test "break -q main" "Breakpoint.*at.*"
|
||||
gdb_test_no_output "set \$bpnummain = \$bpnum"
|
||||
|
||||
gdb_test \
|
||||
@ -873,7 +873,7 @@ proc_with_prefix if_commands_test {} {
|
||||
|
||||
set test "if_commands_test 1"
|
||||
gdb_test_no_prompt "if \$tem == 2" { >} $test
|
||||
gdb_test_no_prompt "break main" { >} $test
|
||||
gdb_test_no_prompt "break -q main" { >} $test
|
||||
gdb_test_no_prompt "else" { >} $test
|
||||
gdb_test_no_prompt "break factorial" { >} $test
|
||||
gdb_test_no_prompt "commands" { >} $test
|
||||
@ -899,7 +899,7 @@ proc_with_prefix if_commands_test {} {
|
||||
|
||||
set test "if_commands_test 2"
|
||||
gdb_test_no_prompt "if \$tem == 1" { >} $test
|
||||
gdb_test_no_prompt "break main" { >} $test
|
||||
gdb_test_no_prompt "break -q main" { >} $test
|
||||
gdb_test_no_prompt "else" { >} $test
|
||||
gdb_test_no_prompt "break factorial" { >} $test
|
||||
gdb_test_no_prompt "commands" { >} $test
|
||||
|
@ -45,7 +45,7 @@ set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2]
|
||||
#
|
||||
# test break at function
|
||||
#
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
|
||||
@ -182,9 +182,9 @@ gdb_test_multiple "continue" "run until breakpoint at marker2" {
|
||||
}
|
||||
|
||||
# Test combinations of conditional and thread-specific breakpoints.
|
||||
gdb_test "break main if (1==1) thread 999" \
|
||||
gdb_test "break -q main if (1==1) thread 999" \
|
||||
"Unknown thread 999\\."
|
||||
gdb_test "break main thread 999 if (1==1)" \
|
||||
gdb_test "break -q main thread 999 if (1==1)" \
|
||||
"Unknown thread 999\\."
|
||||
|
||||
# Verify that both if and thread can be distinguished from a breakpoint
|
||||
|
@ -95,7 +95,7 @@ gdb_test "ptype enum colors" "type = enum colors \{yellow, purple, pink\}.*" "pt
|
||||
#
|
||||
gdb_test "ptype boolean" "type = enum (boolean |)\{FALSE, TRUE\}.*" "ptype unnamed typedef'd enumeration"
|
||||
|
||||
gdb_test "list main" ".*"
|
||||
gdb_test "list -q main" ".*"
|
||||
|
||||
# Same thing with struct and union.
|
||||
gdb_test "ptype t_struct3" "type = struct (t_struct3 |)\{.*
|
||||
|
@ -179,7 +179,7 @@ with_test_prefix "command abbreviations in define" {
|
||||
-re "Type commands for definition of \"breakmain\".\r\nEnd with a line saying just \"end\".\r\n>$" {
|
||||
pass "$test"
|
||||
set test "send body of breakmain"
|
||||
gdb_test_multiple "break main\ncommand\necho\nend\nend" "$test" {
|
||||
gdb_test_multiple "break -q main\ncommand\necho\nend\nend" "$test" {
|
||||
-re "$gdb_prompt $"\
|
||||
{pass "$test"}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ proc test_delete_alias { alias } {
|
||||
# Now, insert a breakpoint at an easy location, and then remove it
|
||||
# using $alias. We verified that the removal worked by checking
|
||||
# the list of breakpoints.
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint insertion ($alias)"
|
||||
|
||||
|
@ -59,7 +59,7 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
|
||||
fail $msg
|
||||
}
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.*line.*" "set breakpoint at main - built absolute"
|
||||
|
||||
set msg "set breakpoint by full path after loading symbols - built absolute"
|
||||
@ -86,7 +86,7 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
|
||||
fail $msg
|
||||
}
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.*line.*" "set breakpoint at main - built relative"
|
||||
|
||||
set msg "set breakpoint by full path after loading symbols - built relative"
|
||||
@ -119,7 +119,7 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
|
||||
fail $msg
|
||||
}
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.*line.*" "set breakpoint at main - built other"
|
||||
|
||||
set msg "set breakpoint by full path after loading symbols - built other"
|
||||
|
@ -70,7 +70,7 @@ if {$is_target_remote} {
|
||||
set cant_insert_hbreak 0
|
||||
set supports_hbreak 0
|
||||
set test "probe hbreak support"
|
||||
gdb_test_multiple "hbreak main" $test {
|
||||
gdb_test_multiple "hbreak -q main" $test {
|
||||
-re "No hardware breakpoint support in the target.*$gdb_prompt $" {
|
||||
pass $test
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ delete_breakpoints
|
||||
|
||||
set supports_hbreak 0
|
||||
set test "probe hardware breakpoint support"
|
||||
gdb_test_multiple "hbreak main" $test {
|
||||
gdb_test_multiple "hbreak -q main" $test {
|
||||
-re "No hardware breakpoint support in the target.*$gdb_prompt $" {
|
||||
pass $test
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ delete_breakpoints
|
||||
#
|
||||
# Test whether the target supports hardware breakpoints at all.
|
||||
#
|
||||
gdb_test_multiple "hbreak main" "hardware breakpoint support" {
|
||||
gdb_test_multiple "hbreak -q main" "hardware breakpoint support" {
|
||||
-re "No hardware breakpoint support in the target.*$gdb_prompt $" {
|
||||
unsupported "hardware breakpoints"
|
||||
return
|
||||
@ -63,7 +63,7 @@ delete_breakpoints
|
||||
#
|
||||
# Test break at function.
|
||||
#
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"hardware breakpoint function"
|
||||
delete_breakpoints
|
||||
@ -95,7 +95,7 @@ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
# it's wherever the processor was stopped when we connected to the
|
||||
# board. So, to be sure, we do a list command.
|
||||
#
|
||||
gdb_test "list main" \
|
||||
gdb_test "list -q main" \
|
||||
".*main \\(int argc, char ..argv, char ..envp\\).*" \
|
||||
"use `list' to establish default source file"
|
||||
gdb_test "hbreak $bp_location1" \
|
||||
@ -145,7 +145,7 @@ delete_breakpoints
|
||||
#
|
||||
# Run until the breakpoint at main is hit. For non-stubs-using targets.
|
||||
#
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"hardware breakpoint function (2)"
|
||||
gdb_run_cmd
|
||||
@ -233,7 +233,7 @@ delete_breakpoints
|
||||
# Test temporary breakpoint at function.
|
||||
#
|
||||
|
||||
gdb_test "thbreak main" \
|
||||
gdb_test "thbreak -q main" \
|
||||
"Hardware assisted breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"temporary hardware breakpoint function"
|
||||
delete_breakpoints
|
||||
@ -520,7 +520,7 @@ delete_breakpoints
|
||||
#
|
||||
# Test break at function.
|
||||
#
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Hardware assisted breakpoint.*at.* file .*, line.*" \
|
||||
"hardware breakpoint function, optimized file"
|
||||
|
||||
|
@ -42,11 +42,11 @@ gdb_test_no_output "set confirm off"
|
||||
# Test inserting a hw breakpoint first, then a sw breakpoint at the
|
||||
# same address.
|
||||
with_test_prefix "hw-sw" {
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Hardware assisted breakpoint .* at .*" \
|
||||
"hbreak"
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Note: breakpoint .* also set at .*\r\nBreakpoint .* at .*" \
|
||||
"break"
|
||||
|
||||
@ -61,11 +61,11 @@ with_test_prefix "hw-sw" {
|
||||
# Now the opposite: test inserting a sw breakpoint first, then a hw
|
||||
# breakpoint at the same address.
|
||||
with_test_prefix "sw-hw" {
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint .* at .*" \
|
||||
"break"
|
||||
|
||||
gdb_test "hbreak main" \
|
||||
gdb_test "hbreak -q main" \
|
||||
"Note: breakpoint .* also set at .*\r\nHardware assisted breakpoint .* at .*" \
|
||||
"hbreak"
|
||||
|
||||
|
@ -20,7 +20,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
|
||||
gdb_test_no_output "set listsize 1"
|
||||
|
||||
gdb_test "list main" ".*"
|
||||
gdb_test "list -q main" ".*"
|
||||
get_debug_format
|
||||
set non_dwarf [expr ! [test_debug_format "DWARF 2"]]
|
||||
|
||||
|
@ -29,11 +29,11 @@ if {![runto_main]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_test "break here" \
|
||||
gdb_test "break -q here" \
|
||||
"Breakpoint.*at.*" \
|
||||
"breakpoint here"
|
||||
|
||||
gdb_test "break main:there" \
|
||||
gdb_test "break -q main:there" \
|
||||
"Breakpoint.*at.*" \
|
||||
"breakpoint there"
|
||||
|
||||
|
@ -90,7 +90,7 @@ clean_restart ${binfile}
|
||||
# Any command that causes GDB to read the debugging info for the
|
||||
# lineinc.c compilation unit will do here.
|
||||
set test_name "tolerate macro info with multiple #inclusions per line"
|
||||
gdb_test_multiple "break main" $test_name {
|
||||
gdb_test_multiple "break -q main" $test_name {
|
||||
-re "Breakpoint 1 at 0x.*: file .*lineinc.c.*\\.\r\n${gdb_prompt}" {
|
||||
pass $test_name
|
||||
}
|
||||
|
@ -195,16 +195,16 @@ proc test_list_function {} {
|
||||
# gcc appears to generate incorrect debugging information for code
|
||||
# in include files, which breaks this test.
|
||||
# SunPRO cc is the second case below, it's also correct.
|
||||
gdb_test "list main" "(5\[ \t\]+int x;.*8\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*7\[ \t\]+x = 0;)" "list function in source file 1"
|
||||
gdb_test "list -q main" "(5\[ \t\]+int x;.*8\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*7\[ \t\]+x = 0;)" "list function in source file 1"
|
||||
|
||||
# Ultrix gdb takes the second case below; it's also correct.
|
||||
# SunPRO cc is the third case.
|
||||
gdb_test "list bar" "(4\[ \t\]+void.*\[ \t\]*long_line.*;.*bar.*9\[ \t\]*.*|1\[ \t\]+void.*8\[ \t\]+\}|1\[ \t\]+void.*7\[ \t\]*long_line ..;|7\[ \t\]+void.*14\[ \t\]+\})" "list function in source file 2"
|
||||
gdb_test "list -q bar" "(4\[ \t\]+void.*\[ \t\]*long_line.*;.*bar.*9\[ \t\]*.*|1\[ \t\]+void.*8\[ \t\]+\}|1\[ \t\]+void.*7\[ \t\]*long_line ..;|7\[ \t\]+void.*14\[ \t\]+\})" "list function in source file 2"
|
||||
|
||||
# Test "list function" for C include file
|
||||
# Ultrix gdb is the second case, still correct.
|
||||
# SunPRO cc is the third case.
|
||||
gdb_test "list foo" "(3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;|2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;|1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;)" "list function in include file"
|
||||
gdb_test "list -q foo" "(3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;|2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;|1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;)" "list function in include file"
|
||||
}
|
||||
|
||||
proc test_list_forward {} {
|
||||
|
@ -193,7 +193,7 @@ proc list_and_check_macro {func macro expected} {
|
||||
return [check_macro $macro $expected "after `list $func'"]
|
||||
}
|
||||
|
||||
gdb_test "list main" ".*main.*" "list main for support check"
|
||||
gdb_test "list -q main" ".*main.*" "list main for support check"
|
||||
set macro_support "unknown"
|
||||
gdb_test_multiple "info source" "test macro information" {
|
||||
-re "Includes preprocessor macro info\..*$gdb_prompt $" {
|
||||
|
@ -102,7 +102,7 @@ gdb_test "info break" \
|
||||
|
||||
set mainline [gdb_get_line_number "break main here"]
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line $mainline.*" \
|
||||
"breakpoint function"
|
||||
|
||||
|
@ -21,6 +21,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
|
||||
|
||||
set bp_main [gdb_get_line_number "break main" ${testfile}.h]
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$testfile.h, line $bp_main\\." \
|
||||
"breakpoint main"
|
||||
|
@ -116,7 +116,7 @@ if {!$gcc_compiled} {
|
||||
}
|
||||
|
||||
# For get_debug_format to do its job, we need to have a current source file.
|
||||
gdb_test "list main" ".*"
|
||||
gdb_test "list -q main" ".*"
|
||||
get_debug_format
|
||||
gdb_test "whatis v_boolean" "type = (enum |)boolean" \
|
||||
"whatis unnamed typedef'd enum (compiler bug in IBM's xlc)"
|
||||
|
@ -81,14 +81,14 @@ if { $gdb_file_cmd_debug_info != "debug" } then {
|
||||
#
|
||||
# test break at function
|
||||
#
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
|
||||
#
|
||||
# test break at quoted function
|
||||
#
|
||||
gdb_test "break \"marker2\"" \
|
||||
gdb_test "break -q \"marker2\"" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint quoted function"
|
||||
|
||||
@ -110,7 +110,7 @@ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
|
||||
# it's wherever the processor was stopped when we connected to the
|
||||
# board. So, to be sure, we do a list command.
|
||||
#
|
||||
gdb_test "list main" \
|
||||
gdb_test "list -q main" \
|
||||
".*main \\(int argc, char \\*\\*argv, char \\*\\*envp\\).*" \
|
||||
"use `list' to establish default source file"
|
||||
gdb_test "break $bp_location1" \
|
||||
@ -227,7 +227,7 @@ delete_breakpoints
|
||||
# test temporary breakpoint at function
|
||||
#
|
||||
|
||||
gdb_test "tbreak main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
|
||||
gdb_test "tbreak -q main" "Temporary breakpoint.*at.* file .*$srcfile, line.*" "temporary breakpoint function"
|
||||
|
||||
#
|
||||
# test break at function in file
|
||||
@ -569,7 +569,7 @@ proc test_different_dir {type test_different_dir xfail} {
|
||||
if {$xfail} {
|
||||
setup_xfail "*-*-*"
|
||||
}
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function, optimized file"
|
||||
|
||||
|
@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_test "break main" \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line .*"
|
||||
|
||||
# Try deleting all breakpoints, using the "server" command prefix.
|
||||
|
@ -63,7 +63,7 @@ save_vars { env(TERM) } {
|
||||
"frame without styling"
|
||||
gdb_test_no_output "set style sources on"
|
||||
|
||||
gdb_test "break main" "file $base_file_expr.*"
|
||||
gdb_test "break -q main" "file $base_file_expr.*"
|
||||
|
||||
gdb_test "print &main" " = .* [style $hex address] <$main_expr>"
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# Exploit formerly failed assertion in scan_dyntag when it got called for
|
||||
# objfile having ".dynamic" section but without having data loaded in target.
|
||||
# Such file is ${binmainfile} through add-symbol-file here. Set context first
|
||||
# by "list main" to have some local BLOCK set in lookup_symbol_global.
|
||||
# by "list -q main" to have some local BLOCK set in lookup_symbol_global.
|
||||
|
||||
standard_testfile start.c .c
|
||||
set binlibfile ${testfile}.x
|
||||
@ -35,5 +35,5 @@ gdb_test "add-symbol-file [standard_output_file ${testfile}] 0" \
|
||||
"Reading symbols from .*" \
|
||||
"add-symbol-file" \
|
||||
"add symbol table from file \".*\" at.*\\(y or n\\) " "y"
|
||||
gdb_test "list main"
|
||||
gdb_test "list -q main"
|
||||
gdb_test "print symbol_without_target_section"
|
||||
|
@ -118,7 +118,7 @@ proc build_cmds_list {} {
|
||||
}
|
||||
|
||||
set test "hbreak"
|
||||
gdb_test_multiple "hbreak main" $test {
|
||||
gdb_test_multiple "hbreak -q main" $test {
|
||||
-re "You may have requested too many.*$gdb_prompt $" {
|
||||
unsupported $test
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ gdb_test_multiple "info breakpoints" $name {
|
||||
}
|
||||
}
|
||||
|
||||
gdb_test "tbreak main" "Temporary breakpoint 4.*" \
|
||||
gdb_test "tbreak -q main" "Temporary breakpoint 4.*" \
|
||||
"Set temporary breakpoint at main"
|
||||
|
||||
set ok 0
|
||||
|
@ -45,4 +45,4 @@ gdb_test "file $binfile" \
|
||||
"file $testfile"
|
||||
|
||||
# Now check that we can still break given the minimal symbol.
|
||||
gdb_test "break main" "Breakpoint $decimal.*"
|
||||
gdb_test "break -q main" "Breakpoint $decimal.*"
|
||||
|
@ -37,7 +37,7 @@ if {[gdb_compile "$objfile $objfile2" $binfile executable {debug}] != "" } {
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
gdb_test "break main" "Breakpoint .*"
|
||||
gdb_test "break -q main" "Breakpoint .*"
|
||||
|
||||
# Bug 15691: gdb would crash here on an assert violation.
|
||||
# The debug info for the TU for "struct s" has already been read,
|
||||
|
@ -45,7 +45,7 @@ gdb_test_no_output "set debug-file-directory [file dirname $binfile]" \
|
||||
"set debug-file-directory"
|
||||
gdb_load $binfile
|
||||
|
||||
gdb_test "break main" "Breakpoint.*at.*"
|
||||
gdb_test "break -q main" "Breakpoint.*at.*"
|
||||
|
||||
gdb_test "ptype baz" "type = class foo {.*"
|
||||
|
||||
|
@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_test "break main" "Breakpoint.*at.*"
|
||||
gdb_test "break -q main" "Breakpoint.*at.*"
|
||||
|
||||
# If we get this far gdb didn't crash.
|
||||
pass $testfile
|
||||
|
@ -611,15 +611,15 @@ namespace eval $testfile {
|
||||
|
||||
# Test explicit "ranges." Make sure that using explicit
|
||||
# locations doesn't alter the expected outcome.
|
||||
gdb_test "list main" ".*" "list main 1"
|
||||
gdb_test "list -q main" ".*" "list main 1"
|
||||
set list_result [capture_command_output "list -,+" ""]
|
||||
gdb_test "list main" ".*" "list main 2"
|
||||
gdb_test "list -q main" ".*" "list main 2"
|
||||
gdb_test "list -line -,-line +" [string_to_regexp $list_result]
|
||||
|
||||
# Ditto for the reverse (except that no output is expected).
|
||||
gdb_test "list myfunction" ".*" "list myfunction 1"
|
||||
gdb_test "list -q myfunction" ".*" "list myfunction 1"
|
||||
gdb_test_no_output "list +,-"
|
||||
gdb_test "list myfunction" ".*" "list myfunction 2"
|
||||
gdb_test "list -q myfunction" ".*" "list myfunction 2"
|
||||
gdb_test_no_output "list -line +, -line -"
|
||||
}
|
||||
|
||||
|
@ -213,6 +213,6 @@ gdb_test "file $binfile" \
|
||||
"Reading symbols from .*" \
|
||||
"set the new inferior file for linespec tests"
|
||||
|
||||
gdb_test "break main" \
|
||||
"Breakpoint \[0-9\]+ at $hex: main. .2 locations." \
|
||||
gdb_test "break -q main" \
|
||||
"Breakpoint \[0-9\]+ at $hex: -qualified main. .2 locations." \
|
||||
"set breakpoint at main in both inferiors"
|
||||
|
@ -65,7 +65,7 @@ proc test_breakpoints_creation_and_listing {} {
|
||||
# -break-info
|
||||
|
||||
set bps {}
|
||||
lappend bps [mi_create_breakpoint "main" \
|
||||
lappend bps [mi_create_breakpoint "--qualified main" \
|
||||
"break-insert operation" \
|
||||
-number 1 -func main -file ".*basics.c" \
|
||||
-line $line_main_body]
|
||||
|
@ -23,4 +23,4 @@ import gdb
|
||||
# parameter change notification.
|
||||
gdb.execute("set width 101", to_string=True)
|
||||
# And finally a command that will use the console stream without redirection
|
||||
gdb.execute("list main")
|
||||
gdb.execute("list -q main")
|
||||
|
@ -79,11 +79,11 @@ foreach inf_sel {1 2} {
|
||||
"switch to inferior"
|
||||
|
||||
set test "set breakpoint"
|
||||
gdb_test_multiple "break main" $test {
|
||||
gdb_test_multiple "break -q main" $test {
|
||||
-re "Sending packet.*$gdb_prompt $" {
|
||||
fail $test
|
||||
}
|
||||
-re "^break main\r\nBreakpoint .* at .*$gdb_prompt $" {
|
||||
-re "^break -q main\r\nBreakpoint .* at .*$gdb_prompt $" {
|
||||
pass $test
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ proc do_test {multiprocess} {
|
||||
set gdbserver_protocol [lindex $res 0]
|
||||
set gdbserver_gdbport [lindex $res 1]
|
||||
|
||||
gdb_test "break main" "Breakpoint .*"
|
||||
gdb_test "break -q main" "Breakpoint .*"
|
||||
|
||||
gdb_test "target $gdbserver_protocol $gdbserver_gdbport" \
|
||||
"Remote debugging using .*" \
|
||||
|
@ -214,7 +214,7 @@ proc tracepoint_change_loc_2 { trace_type } {
|
||||
"tracepoint with one location"
|
||||
|
||||
set main_bp 0
|
||||
gdb_test_multiple "break main" "set breakpoint on main" {
|
||||
gdb_test_multiple "break -q main" "set breakpoint on main" {
|
||||
-re "Breakpoint (\[0-9\]*) at .*, line.*$gdb_prompt $" {
|
||||
set main_bp $expect_out(1,string)
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ proc pending_tracepoint_resolved { trace_type } {
|
||||
|
||||
gdb_load ${binfile}
|
||||
|
||||
gdb_test "break main" "Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
gdb_test "break -q main" "Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
|
||||
gdb_run_cmd
|
||||
@ -132,7 +132,7 @@ proc pending_tracepoint_works { trace_type } {
|
||||
"single pending tracepoint info"
|
||||
|
||||
# Run to main which should resolve a pending tracepoint
|
||||
gdb_test "break main" "Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
gdb_test "break -q main" "Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
"breakpoint function"
|
||||
gdb_run_cmd
|
||||
gdb_test "" "Breakpoint 2, main.*"
|
||||
|
@ -33,8 +33,8 @@ set text [Term::get_all_lines]
|
||||
gdb_assert {![string match "No Source Available" $text]} \
|
||||
"initial source listing"
|
||||
|
||||
Term::command "list main"
|
||||
Term::check_contents "list main" "21 *return 0"
|
||||
Term::command "list -q main"
|
||||
Term::check_contents "list -q main" "21 *return 0"
|
||||
|
||||
# Get the first source line.
|
||||
set line [Term::get_line 1]
|
||||
|
@ -25,7 +25,7 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
|
||||
|
||||
Term::clean_restart 24 80 $testfile
|
||||
|
||||
gdb_test "list main"
|
||||
gdb_test "list -q main"
|
||||
|
||||
if {![Term::enter_tui]} {
|
||||
unsupported "TUI not supported"
|
||||
|
@ -34,9 +34,9 @@ Term::check_contents "initial source listing" "21 *return 0"
|
||||
Term::command "layout asm"
|
||||
Term::check_contents "asm window shows main" "$hex <main>"
|
||||
|
||||
Term::command "list main"
|
||||
Term::check_contents "list main" "21 *return 0"
|
||||
# The following 'focus next' must be immediately after 'list main' to
|
||||
# ensure that GDB has a valid idea of what is currently focused.
|
||||
Term::command "list -q main"
|
||||
Term::check_contents "list -q main" "21 *return 0"
|
||||
# The following 'focus next' must be immediately after 'list -q main'
|
||||
# to ensure that GDB has a valid idea of what is currently focused.
|
||||
Term::command "focus next"
|
||||
Term::check_contents "focus next" "Focus set to cmd window"
|
||||
|
@ -5942,7 +5942,7 @@ gdb_caching_proc gdb_has_argv0 {
|
||||
gdb_load "$exe"
|
||||
|
||||
# Set breakpoint on main.
|
||||
gdb_test_multiple "break main" "break main" {
|
||||
gdb_test_multiple "break -q main" "break -q main" {
|
||||
-re "Breakpoint.*${gdb_prompt} $" {
|
||||
}
|
||||
-re "${gdb_prompt} $" {
|
||||
|
Loading…
Reference in New Issue
Block a user