OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.cell/] [solib.exp] - Blame information for rev 231

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
# Copyright 2009 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
# Contributed by Markus Deuling .
17
#
18
# Testsuite for Cell Broadband Engine combined debugger
19
# This testcase checks 'info sharedlibrary ' command.
20
 
21
load_lib cell.exp
22
 
23
set ppu_file "break"
24
set ppu_src ${srcdir}/${subdir}/${ppu_file}.c
25
set ppu_bin ${objdir}/${subdir}/${ppu_file}
26
set spu_file "break-spu"
27
set spu_src ${srcdir}/${subdir}/${spu_file}.c
28
set spu_bin ${objdir}/${subdir}/${spu_file}
29
 
30
if {[skip_cell_tests]} {
31
    return 0
32
}
33
 
34
# Compile SPU binary.
35
if { [gdb_compile_cell_spu $spu_src $spu_bin executable {debug}]  != "" } {
36
  unsupported "Compiling spu binary failed."
37
  return -1
38
}
39
# Compile PPU binary.
40
if { [gdb_cell_embedspu $spu_bin $spu_bin-embed.o {debug}]  != "" } {
41
  unsupported "Embedding spu binary failed."
42
  return -1
43
}
44
if { [gdb_compile_cell_ppu [list $ppu_src $spu_bin-embed.o] $ppu_bin executable {debug}] != "" } {
45
  unsupported "Compiling ppu binary failed."
46
  return -1
47
}
48
 
49
if [get_compiler_info ${ppu_bin}] {
50
  return -1
51
}
52
 
53
 
54
gdb_exit
55
gdb_start
56
gdb_reinitialize_dir $srcdir/$subdir
57
gdb_load ${ppu_bin}
58
 
59
# No programm running, no libraries should be loaded.
60
gdb_test "info sharedlibrary" \
61
         "No shared libraries loaded at this time." \
62
         "no shared library is loaded"
63
 
64
if ![runto_main] then {
65
  fail "Can't run to main"
66
  return 0
67
}
68
 
69
# Standing in PPU thread, now some libs should be loaded
70
# including libspe library.
71
gdb_test "info sharedlibrary" \
72
         "From.*To.*Syms Read.*Shared Object Library.*libspe.*" \
73
         "binary started, some libraries loaded"
74
 
75
# Continue to SPU
76
cont_spu_main
77
check_spu_arch ""
78
 
79
# In SPU thread now, the SPU binary should now appear in the list
80
# of shared libraries.
81
gdb_test "info sharedlibrary" \
82
         "From.*To.*Syms Read.*Shared Object Library.*libspe.*$spu_bin.*@.*x.*" \
83
         "spu thread, spu binary as shared library"
84
 
85
gdb_exit
86
return 0

powered by: WebSVN 2.1.0

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