gdb/testsuite/
[deliverable/binutils-gdb.git] / gdb / testsuite / config / gdbserver.exp
CommitLineData
0fb0cc75 1# Copyright 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009
9b254dd1 2# Free Software Foundation, Inc.
ae0323a8 3
c906108c
SS
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
e22f8b7c 6# the Free Software Foundation; either version 3 of the License, or
c906108c 7# (at your option) any later version.
e22f8b7c 8#
c906108c
SS
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
e22f8b7c 13#
c906108c 14# You should have received a copy of the GNU General Public License
e22f8b7c 15# along with this program. If not, see <http://www.gnu.org/licenses/>.
ae0323a8 16
6f8eac0e
DJ
17# Test framework for GDB (remote protocol) using a "gdbserver",
18# ie. a debug agent running as a native process on the same or
19# a different host.
ae0323a8
MS
20
21#
22# This module to be used for testing gdb with a "gdbserver"
23# built either from libremote or from gdb/gdbserver.
24#
25
ae0323a8
MS
26#
27# To be addressed or set in your baseboard config file:
c906108c 28#
ae0323a8
MS
29# set_board_info gdb_protocol "remote"
30# Unles you have a gdbserver that uses a different protocol...
c906108c 31#
ae0323a8
MS
32# set_board_info use_gdb_stub 1
33# This tells the rest of the test suite not to do things
34# like "run" which don't work well on remote targets.
c906108c 35#
ae0323a8
MS
36# set_board_info gdb,do_reload_on_run 1
37# Unles you have a gdbserver that can handle multiple sessions.
c906108c 38#
ae0323a8
MS
39# set_board_info noargs 1
40# At present there is no provision in the remote protocol
41# for passing arguments. This test framework does not
42# address the issue, so it's best to set this variable
43# in your baseboard configuration file.
44# FIXME: there's no reason why the test harness couldn't
45# pass commandline args when it spawns gdbserver.
46#
47# set_board_info gdb,noinferiorio 1
48# Neither the traditional gdbserver nor the one in libremote
49# can presently capture stdout and relay it to GDB via the
50# 'O' packet. This means that tests involving printf will
51# fail unles you set this varibale in your baseboard
52# configuration file.
53#
54# set_board_info gdb,no_hardware_watchpoints 1
55# Unles you have a gdbserver that supports hardware watchpoints.
56# FIXME: gdb should detect if the target doesn't support them,
57# and fall back to using software watchpoints.
58#
59# set_board_info gdb_server_prog
60# This will be the path to the gdbserver program you want to test.
61# Defaults to "gdbserver".
62#
63# set_board_info sockethost
64# The name of the host computer whose socket is being used.
65# Defaults to "localhost". Note: old gdbserver requires
66# that you define this, but libremote/gdbserver does not.
67#
6f8eac0e 68# set_board_info gdb,socketport
ae0323a8
MS
69# Port id to use for socket connection. If not set explicitly,
70# it will start at "2345" and increment for each use.
71#
72
6f8eac0e 73# The guts live in gdbserver-support.exp now.
c906108c 74
6f8eac0e 75load_lib gdbserver-support.exp
c906108c 76
b741e217
DJ
77proc gdbserver_gdb_load { } {
78 return [gdbserver_spawn ""]
da6012e5
DJ
79}
80
b741e217
DJ
81proc gdb_reload { } {
82 return [gdbserver_run ""]
c906108c 83}
b0f4b84b
DJ
84
85proc gdb_reconnect { } {
86 return [gdbserver_reconnect]
87}
This page took 0.840058 seconds and 4 git commands to generate.