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.arch/] [spu-ls.exp] - Blame information for rev 341

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 330 jeremybenn
# Copyright 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
# This file is part of the gdb testsuite.
17
#
18
# Contributed by Ulrich Weigand  .
19
# Tests for SPU local-store access.
20
 
21
if { ![istarget "spu-*-elf"] } then {
22
  verbose "Skipping SPU-only testcase"
23
  return
24
}
25
 
26
set testfile "spu-ls"
27
set srcfile ${testfile}.c
28
set binfile ${objdir}/${subdir}/${testfile}
29
set sources ${srcdir}/${subdir}/${srcfile}
30
 
31
if { [gdb_compile $sources ${binfile} executable { debug }] != "" } {
32
  return -1
33
}
34
 
35
gdb_exit
36
gdb_start
37
gdb_reinitialize_dir $srcdir/$subdir
38
gdb_load ${binfile}
39
 
40
if ![runto_main] then {
41
  fail "Can't run to main"
42
  return 0
43
}
44
 
45
gdb_test "print ptr" " = 0x12345678 \".*\"" "print ptr"
46
gdb_test_no_output "set ptr = array + \$lslr + 1" "set ptr = array + \$lslr + 1"
47
gdb_test_no_output "set array\[0\] = 1" "set array\[0\] = 1"
48
gdb_test "print *ptr" " = 1 '\\\\001'" "print *ptr"
49
gdb_test_no_output "set *ptr = 2" "set *ptr = 2"
50
gdb_test "print array\[0\]" " = 2 '\\\\002'" "print array\[0\]"
51
 
52
gdb_exit
53
 
54
return 0

powered by: WebSVN 2.1.0

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