Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: gdb/testsuite/gdb.base/gdbvars.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/gdbvars.c ('k') | gdb/testsuite/gdb.base/gnu-debugdata.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/gdbvars.exp
diff --git a/gdb/testsuite/gdb.base/gdbvars.exp b/gdb/testsuite/gdb.base/gdbvars.exp
index 0499f6ce9f3835469783c6cbd9d3fa33b89952ee..85aaca040d80c5b28b2d67a8bc64c98a03f594f9 100644
--- a/gdb/testsuite/gdb.base/gdbvars.exp
+++ b/gdb/testsuite/gdb.base/gdbvars.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1997, 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-2013 Free Software Foundation, Inc.
# 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
@@ -16,12 +16,10 @@
# This file was written by Fred Fish. (fnf@cygnus.com)
-set testfile "gdbvars"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested gdbvars.exp
+if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
+ untested $testfile.exp
return -1
}
@@ -56,6 +54,34 @@ proc test_convenience_variables {} {
"Print contents of uninitialized convenience variable"
}
+proc test_convenience_functions {} {
+ gdb_test "print \$_isvoid" " = <internal function _isvoid>" \
+ "Print internal function \$_isvoid"
+
+ gdb_test "print \$isvoid_foo" " = void" \
+ "Print void convenience variable"
+
+ gdb_test "print \$_isvoid (\$isvoid_foo)" " = 1" \
+ "Check whether void convenience variable is void"
+
+ gdb_test_no_output "set \$isvoid_foo = 1" \
+ "Set void convenience variable to 1"
+
+ gdb_test "print \$_isvoid (\$isvoid_foo)" " = 0" \
+ "Check whether non-void convenience variable is void"
+
+ # For the next test, we need the inferior to be running.
+ if { ![runto_main] } {
+ return -1
+ }
+
+ gdb_test "print \$_isvoid (foo_void ())" " = 1" \
+ "Check whether void function is void"
+
+ gdb_test "print \$_isvoid (foo_int ())" " = 0" \
+ "Check whether non-void function is void"
+}
+
proc test_value_history {} {
global gdb_prompt
@@ -112,15 +138,9 @@ proc test_with_program {} {
"Print contents of new convenience variable of program variable"
}
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
gdb_test_no_output "set print sevenbit-strings"
test_value_history
test_convenience_variables
+test_convenience_functions
test_with_program
« no previous file with comments | « gdb/testsuite/gdb.base/gdbvars.c ('k') | gdb/testsuite/gdb.base/gnu-debugdata.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698