OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gdb-7.2/] [gdb-7.2-or32-1.0rc1/] [gdb/] [testsuite/] [gdb.trace/] [tsv.exp] - Blame information for rev 341

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 jeremybenn
#   Copyright 2009, 2010 Free Software Foundation, Inc.
2
#
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 3 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program.  If not, see .
15
 
16
load_lib "trace-support.exp";
17
 
18
if $tracelevel then {
19
    strace $tracelevel
20
}
21
 
22
 
23
gdb_exit
24
gdb_start
25
set testfile "actions"
26
set srcfile ${testfile}.c
27
set binfile $objdir/$subdir/tsv
28
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
29
          executable {debug nowarnings}] != "" } {
30
    untested tracecmd.exp
31
    return -1
32
}
33
gdb_reinitialize_dir $srcdir/$subdir
34
 
35
# If testing on a remote host, download the source file.
36
# remote_download host $srcdir/$subdir/$srcfile
37
 
38
gdb_file_cmd $binfile
39
 
40
gdb_test "tvariable \$tvar1" \
41
  "Trace state variable \\\$tvar1 created, with initial value 0." \
42
  "Create a trace state variable"
43
 
44
gdb_test "tvariable \$tvar2 = 45" \
45
  "Trace state variable \\\$tvar2 created, with initial value 45." \
46
  "Create a trace state variable with initial value"
47
 
48
gdb_test "tvariable \$tvar2 = -92" \
49
  "Trace state variable \\\$tvar2 now has initial value -92." \
50
  "Change initial value of a trace state variable"
51
 
52
gdb_test "tvariable \$tvar3 = 2 + 3" \
53
  "Trace state variable \\\$tvar3 created, with initial value 5." \
54
  "Create a trace state variable with expression"
55
 
56
gdb_test "tvariable \$tvar3 = 1234567000000" \
57
  "Trace state variable \\\$tvar3 now has initial value 1234567000000." \
58
  "Init trace state variable to a 64-bit value"
59
 
60
gdb_test "tvariable main" \
61
  "Syntax must be \\\$NAME \\\[ = EXPR \\\]" \
62
  "tvariable syntax error, bad name"
63
 
64
gdb_test "tvariable \$tvar1 - 93" \
65
  "Syntax must be \\\$NAME \\\[ = EXPR \\\]" \
66
  "tvariable syntax error, not an assignment"
67
 
68
gdb_test "info tvariables" \
69
    "Name\[\t \]+Initial\[\t \]+Current.*
70
\\\$tvar1\[\t \]+0\[\t \]+.*
71
\\\$tvar2\[\t \]+-92\[\t \]+.*
72
\\\$tvar3\[\t \]+1234567000000\[\t \]+.*.*" \
73
  "List tvariables"
74
 
75
gdb_test_no_output "delete tvariable \$tvar2" \
76
  "delete trace state variable"
77
 
78
gdb_test "info tvariables" \
79
    "Name\[\t \]+Initial\[\t \]+Current.*
80
\\\$tvar1\[\t \]+0\[\t \]+.*
81
\\\$tvar3\[\t \]+1234567000000\[\t \]+.*.*" \
82
  "List tvariables after deletion"
83
 
84
gdb_test "delete tvariable" \
85
    "" \
86
    "Delete all trace state variables" \
87
    "Delete all trace state variables.*y or n.*$" \
88
    "y"
89
 
90
gdb_test "info tvariables" \
91
  "No trace state variables.*" \
92
  "List tvariables after deleting all"
93
 
94
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.