aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-10-05 23:13:56 +0000
committerJason Molenda <jmolenda@apple.com>1999-10-05 23:13:56 +0000
commit2acceee2182a942e6a79a972009540990f4dfabf (patch)
tree2ed7ca473f0b49181f1d0214c3450a7eb17f7bcb /gdb/testsuite/gdb.base
parent3e9c42873ee1d0bbb03039baea78c617174f9269 (diff)
downloadgdb-2acceee2182a942e6a79a972009540990f4dfabf.zip
gdb-2acceee2182a942e6a79a972009540990f4dfabf.tar.gz
gdb-2acceee2182a942e6a79a972009540990f4dfabf.tar.bz2
import gdb-1999-10-04 snapshot
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/break.c3
-rw-r--r--gdb/testsuite/gdb.base/break.exp20
-rw-r--r--gdb/testsuite/gdb.base/help.exp2
3 files changed, 19 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.base/break.c b/gdb/testsuite/gdb.base/break.c
index 7e5fb8e..e7e6af6 100644
--- a/gdb/testsuite/gdb.base/break.c
+++ b/gdb/testsuite/gdb.base/break.c
@@ -82,7 +82,8 @@ char *argv[], **envp;
marker2 (43);
marker3 ("stack", "trace");
marker4 (177601976L);
- return 0;
+ argc = (argc == 12345); /* This is silly, but we can step off of it */
+ return argc;
}
#ifdef PROTOTYPES
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index bfd3c41..d5b2af3 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -128,7 +128,7 @@ if {$hp_aCC_compiler} {
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:95.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:96.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:79.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:85" \
@@ -180,16 +180,28 @@ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*,
# Run until the breakpoint set in a function in a file
#
for {set i 6} {$i >= 1} {incr i -1} {
- gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:95.*95\[\t \]+.*if .value > 1. \{.*" \
+ gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, factorial \\(value=$i\\) at .*$srcfile:96.*96\[\t \]+.*if .value > 1. \{.*" \
"run until file:function($i) breakpoint"
}
#
# run until the file:function breakpoint at a line number in a file
#
-gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:85.*85\[\t \]+return 0;" \
+gdb_test continue "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:85.*85\[\t \]+argc = \\(argc == 12345\\);.*" \
"run until file:linenum breakpoint"
+# Test break at offset +1
+
+gdb_test "break +1" \
+ "Breakpoint.*at.* file .*$srcfile, line 86\\." \
+ "breakpoint offset +1"
+
+# Check to see if breakpoint is hit when stepped onto
+
+gdb_test "step" \
+ ".*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:86.*86\[\t \]+return argc;" \
+ "step onto breakpoint"
+
#
# delete all breakpoints so we can start over, course this can be a test too
#
@@ -237,7 +249,7 @@ gdb_test "tbreak $srcfile:81" "Breakpoint.*at.* file .*$srcfile, line 81.*" "Te
#
gdb_test "info break" "Num Type.*Disp Enb Address.*What.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:$main_line.*\[\r\n\]
-\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:95.*\[\r\n\]
+\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial$proto at .*$srcfile:96.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:79.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:75.*\[\r\n\]
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:85.*\[\r\n\]
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index 54bfdb1..dfd65a2 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -34,7 +34,7 @@ gdb_test "set height 400" "" "test set height"
# use a larger expect input buffer for long help outputs.
# test help add-symbol-file
-gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR.*\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded..*\[\r\n\]+ADDR is the starting address of the file\'s text." "help add-symbol-file"
+gdb_test "help add-symbol-file" "Usage: add-symbol-file FILE ADDR .*DATA_ADDR .*BSS_ADDR.*\[\r\n\]+or: add-symbol-file FILE -T<SECT> <SECT_ADDR> -T<SECT> <SECT_ADDR> ....*\[\r\n\]+Load the symbols from FILE, assuming FILE has been dynamically loaded..*\[\r\n\]+ADDR is the starting address of the file's text..*\[\r\n\]+The optional arguments, DATA_ADDR and BSS_ADDR, should be specified.*\[\r\n\]+if the data and bss segments are not contiguous with the text..*\[\r\n\]+For complicated cases, SECT is a section name to be loaded at SECT_ADDR." "help add-symbol-file"
# test help aliases
gdb_test "help aliases" "Aliases of other commands..*\[\r\n\]+List of commands\:.*\[\r\n\]+Type \"help\" followed by command name for full documentation..*\[\r\n\]+Command name abbreviations are allowed if unambiguous." "help aliases"
gdb_test "help attach" "Attach to a process or file outside of GDB..*\[\r\n\]+This command attaches to another target, of the same type as your last.*\[\r\n\]+\"target\" command .\"info files\" will show your target stack.*\[\r\n\]+The command may take as argument a process id or a device file..*\[\r\n\]+For a process id, you must have permission to send the process a signal,.*\[\r\n\]+and it must have the same effective uid as the debugger..*\[\r\n\]+When using \"attach\" with a process id, the debugger finds the.*\[\r\n\]+program running in the process, looking first in the current working.*\[\r\n\]+directory, or .if not found there. using the source file search path.*\[\r\n\]+\\(see the \"directory\" command\\). You can also use the \"file\" command.*\[\r\n\]+to specify the program, and to load its symbol table." "help attach"