]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/server.h
PARAMS removal.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / server.h
CommitLineData
c906108c
SS
1/* Common definitions for remote server for GDB.
2 Copyright (C) 1993 Free Software Foundation, Inc.
3
c5aa993b 4 This file is part of GDB.
c906108c 5
c5aa993b
JM
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
c906108c 10
c5aa993b
JM
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
c906108c 15
c5aa993b
JM
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
c906108c
SS
20
21#include "defs.h"
22#include <setjmp.h>
23
24/* Target-specific functions */
25
a14ed312
KB
26int create_inferior (char *program, char **allargs);
27void kill_inferior (void);
28void fetch_inferior_registers (int regno);
29void store_inferior_registers (int regno);
30int mythread_alive (int pid);
31void myresume (int step, int signo);
32unsigned char mywait (char *status);
33void read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len);
34int write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len);
c906108c 35int create_inferior ();
4ce44c66 36void initialize_low ();
c906108c
SS
37
38/* Target-specific variables */
39
5c44784c 40extern char *registers;
c906108c
SS
41
42/* Public variables in server.c */
43
44extern int cont_thread;
45extern int general_thread;
46extern int thread_from_wait;
47extern int old_thread_from_wait;
48
49extern jmp_buf toplevel;
50extern int inferior_pid;
51
52/* Functions from remote-utils.c */
53
a14ed312
KB
54int putpkt (char *buf);
55int getpkt (char *buf);
56void remote_open (char *name);
57void remote_close (void);
58void write_ok (char *buf);
59void write_enn (char *buf);
60void enable_async_io (void);
61void disable_async_io (void);
62void convert_ascii_to_int (char *from, char *to, int n);
63void convert_int_to_ascii (char *from, char *to, int n);
64void prepare_resume_reply (char *buf, char status, unsigned char sig);
c906108c 65
a14ed312
KB
66void decode_m_packet (char *from, CORE_ADDR * mem_addr_ptr,
67 unsigned int *len_ptr);
68void decode_M_packet (char *from, CORE_ADDR * mem_addr_ptr,
69 unsigned int *len_ptr, char *to);
c906108c
SS
70
71
72/* Functions from utils.c */
73
a14ed312 74void perror_with_name (char *string);
5c44784c
JM
75
76
77/* Maximum number of bytes to read/write at once. The value here
78 is chosen to fill up a packet (the headers account for the 32). */
79#define MAXBUFBYTES(N) (((N)-32)/2)
80
81/* Buffer sizes for transferring memory, registers, etc. Round up PBUFSIZ to
82 hold all the registers, at least. */
83#define PBUFSIZ ((REGISTER_BYTES > MAXBUFBYTES (2000)) \
84 ? (REGISTER_BYTES * 2 + 32) \
85 : 2000)