gdb.h revision 139778
1218887Sdim/*- 2218887Sdim * Copyright (c) 2004 Marcel Moolenaar 3218887Sdim * All rights reserved. 4218887Sdim * 5218887Sdim * Redistribution and use in source and binary forms, with or without 6218887Sdim * modification, are permitted provided that the following conditions 7218887Sdim * are met: 8218887Sdim * 9218887Sdim * 1. Redistributions of source code must retain the above copyright 10218887Sdim * notice, this list of conditions and the following disclaimer. 11218887Sdim * 2. Redistributions in binary form must reproduce the above copyright 12218887Sdim * notice, this list of conditions and the following disclaimer in the 13218887Sdim * documentation and/or other materials provided with the distribution. 14218887Sdim * 15219077Sdim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16218887Sdim * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17218887Sdim * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18218887Sdim * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19218887Sdim * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20218887Sdim * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21218887Sdim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22219077Sdim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23218887Sdim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24218887Sdim * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25218887Sdim * 26218887Sdim * $FreeBSD: head/sys/gdb/gdb.h 139778 2005-01-06 18:27:30Z imp $ 27218887Sdim */ 28218887Sdim 29218887Sdim#ifndef _GDB_GDB_H_ 30219077Sdim#define _GDB_GDB_H_ 31218887Sdim 32219077Sdimtypedef int gdb_checkc_f(void); 33218887Sdimtypedef int gdb_getc_f(void); 34218887Sdimtypedef void gdb_init_f(void); 35218887Sdimtypedef int gdb_probe_f(void); 36218887Sdimtypedef void gdb_putc_f(int); 37218887Sdimtypedef void gdb_term_f(void); 38218887Sdim 39218887Sdimstruct gdb_dbgport { 40218887Sdim const char *gdb_name; 41218887Sdim gdb_checkc_f *gdb_checkc; 42218887Sdim gdb_getc_f *gdb_getc; 43218887Sdim gdb_init_f *gdb_init; 44218887Sdim gdb_probe_f *gdb_probe; 45218887Sdim gdb_putc_f *gdb_putc; 46221345Sdim gdb_term_f *gdb_term; 47221345Sdim int gdb_active; 48218887Sdim}; 49218887Sdim 50218887Sdim#define GDB_DBGPORT(name, probe, init, term, checkc, getc, putc) \ 51218887Sdim static struct gdb_dbgport name##_gdb_dbgport = { \ 52218887Sdim .gdb_name = #name, \ 53218887Sdim .gdb_checkc = checkc, \ 54218887Sdim .gdb_getc = getc, \ 55218887Sdim .gdb_init = init, \ 56219077Sdim .gdb_probe = probe, \ 57219077Sdim .gdb_putc = putc, \ 58219077Sdim .gdb_term = term \ 59219077Sdim }; \ 60219077Sdim DATA_SET(gdb_dbgport_set, name##_gdb_dbgport) 61219077Sdim 62219077Sdim#endif /* !_GDB_GDB_H_ */ 63219077Sdim