00001 /* 00002 * GDB.h - basic support macros for putting gdb commands in C. 00003 * 00004 * Copyright (c) 1997 Phil Maker 00005 * All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 1. Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 2. Redistributions in binary form must reproduce the above copyright 00013 * notice, this list of conditions and the following disclaimer in the 00014 * documentation and/or other materials provided with the distribution. 00015 * 00016 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 00017 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00018 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00019 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 00020 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00021 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00022 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00023 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00024 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00025 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00026 * SUCH DAMAGE. 00027 * 00028 * Id: GDB.h,v 1.1.1.1 1997/11/23 11:45:50 pjm Exp 00029 */ 00030 00031 #ifndef _GDB_h_ 00032 #define _GDB_h_ 1 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 00039 #ifndef WITHOUT_NANA 00040 00041 /* 00042 * nana-config.h - the system wide configuration file; we put the ifndef 00043 * around it to avoid the file 5 million times during a compile. 00044 */ 00045 00046 #ifndef _nana_config_h_ 00047 #include <nana-config.h> 00048 #endif 00049 00050 /* 00051 * GDB(c) - just puts the command into the output of nana 00052 * c should be a single line of text 00053 */ 00054 00055 #ifdef _NANA_FILTER_ 00056 #define GDB(command) @@command@@ 00057 #else 00058 #define GDB(command) /* nothing */ 00059 #endif 00060 00061 /* 00062 * GDBCALL(c) - calls a gdb command whenever control reaches the 00063 * current line. 00064 */ 00065 00066 #ifdef _NANA_FILTER_ 00067 #define GDBCALL(comd) \ 00068 @@break @__FILE__:__LINE__@@ \ 00069 @@command@@ \ 00070 @@silent@@ \ 00071 @@comd@@ \ 00072 @@cont@@ \ 00073 @@end@@ 00074 #else 00075 #define GDBCALL(c) DI_MAKE_VALID_BREAKPOINT(1) 00076 #endif 00077 00078 #else /* defined(WITHOUT_NANA) */ 00079 00080 #define GDB(e) /* empty */ 00081 #define GDBCALL(e) /* empty */ 00082 00083 #endif /* !defined(WITHOUT_NANA) */ 00084 00085 #ifdef __cplusplus 00086 } 00087 #endif 00088 00089 #endif /* _GDB_h_ */ 00090
1.3.4