198944Sobrien/* Remote target communications for serial-line targets in custom GDB protocol 298944Sobrien Copyright 1999 Free Software Foundation, Inc. 398944Sobrien 498944Sobrien This file is part of GDB. 598944Sobrien 698944Sobrien This program is free software; you can redistribute it and/or modify 798944Sobrien it under the terms of the GNU General Public License as published by 898944Sobrien the Free Software Foundation; either version 2 of the License, or 998944Sobrien (at your option) any later version. 1098944Sobrien 1198944Sobrien This program is distributed in the hope that it will be useful, 1298944Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1398944Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1498944Sobrien GNU General Public License for more details. 1598944Sobrien 1698944Sobrien You should have received a copy of the GNU General Public License 1798944Sobrien along with this program; if not, write to the Free Software 1898944Sobrien Foundation, Inc., 59 Temple Place - Suite 330, 1998944Sobrien Boston, MA 02111-1307, USA. */ 2098944Sobrien 2198944Sobrien#ifndef REMOTE_H 2298944Sobrien#define REMOTE_H 2398944Sobrien 2498944Sobrien/* FIXME?: move this interface down to tgt vector) */ 2598944Sobrien 2698944Sobrien/* Read a packet from the remote machine, with error checking, and 2798944Sobrien store it in BUF. BUF is expected to be of size PBUFSIZ. If 2898944Sobrien FOREVER, wait forever rather than timing out; this is used while 2998944Sobrien the target is executing user code. */ 3098944Sobrien 3198944Sobrienextern void getpkt (char *buf, long sizeof_buf, int forever); 3298944Sobrien 3398944Sobrien/* Send a packet to the remote machine, with error checking. The data 3498944Sobrien of the packet is in BUF. The string in BUF can be at most PBUFSIZ 3598944Sobrien - 5 to account for the $, # and checksum, and for a possible /0 if 3698944Sobrien we are debugging (remote_debug) and want to print the sent packet 3798944Sobrien as a string */ 3898944Sobrien 3998944Sobrienextern int putpkt (char *buf); 4098944Sobrien 4198944Sobrien/* Send HEX encoded string to the target console. (gdb_stdtarg) */ 4298944Sobrien 4398944Sobrienextern void remote_console_output (char *); 4498944Sobrien 4598944Sobrien 4698944Sobrien/* FIXME: cagney/1999-09-20: The remote cisco stuff in remote.c needs 4798944Sobrien to be broken out into a separate file (remote-cisco.[hc]?). Before 4898944Sobrien that can happen, a remote protocol stack framework needs to be 4998944Sobrien implemented. */ 5098944Sobrien 5198944Sobrienextern void remote_cisco_objfile_relocate (bfd_signed_vma text_off, 5298944Sobrien bfd_signed_vma data_off, 5398944Sobrien bfd_signed_vma bss_off); 5498944Sobrien 5598944Sobrienextern void async_remote_interrupt_twice (void *arg); 5698944Sobrien 57130803Smarcelextern int remote_write_bytes (CORE_ADDR memaddr, char *myaddr, int len); 58130803Smarcel 59130803Smarcelextern int remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len); 60130803Smarcel 61130803Smarcelextern void (*target_resume_hook) (void); 62130803Smarcelextern void (*target_wait_loop_hook) (void); 63130803Smarcel 6498944Sobrien#endif 65