| 1 | /* |
| 2 | * avarice - The "avarice" program. |
| 3 | * Copyright (C) 2001 Scott Finneran |
| 4 | * Copyright (C) 2002 Intel Corporation |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License Version 2 |
| 8 | * as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. |
| 18 | * |
| 19 | * Interface definition for the include/remote.c file. |
| 20 | */ |
| 21 | |
| 22 | #ifndef INCLUDE_REMOTE_H |
| 23 | #define INCLUDE_REMOTE_H |
| 24 | |
| 25 | /** File descriptor for gdb communication. -1 before connection. **/ |
| 26 | extern int gdbFileDescriptor; |
| 27 | |
| 28 | /** Talk to gdb over file descriptor 'fd' **/ |
| 29 | void setGdbFile(int fd); |
| 30 | |
| 31 | /** Return single char read from gdb. Abort in case of problem, |
| 32 | exit cleanly if EOF detected on gdbFileDescriptor. **/ |
| 33 | int getDebugChar(void); |
| 34 | |
| 35 | /** printf 'fmt, ...' to gdb **/ |
| 36 | void gdbOut(const char *fmt, ...); |
| 37 | void vgdbOut(const char *fmt, va_list args); |
| 38 | |
| 39 | /** GDB remote protocol interpreter */ |
| 40 | void talkToGdb(void); |
| 41 | |
| 42 | #endif /* INCLUDE_REMOTE_H */ |