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