00001 // 00002 // GDBRDP.H 00003 // 00004 // Definitions for the GDB remote debugger interface commands 00005 // 00006 // Copyright (c) 2002, Jason Riffel - TotalEmbedded LLC. 00007 // All rights reserved. 00008 // 00009 // Redistribution and use in source and binary forms, with or without 00010 // modification, are permitted provided that the following conditions 00011 // are met: 00012 // 00013 // Redistributions of source code must retain the above copyright 00014 // notice, this list of conditions and the following disclaimer. 00015 // 00016 // Redistributions in binary form must reproduce the above copyright 00017 // notice, this list of conditions and the following disclaimer in 00018 // the documentation and/or other materials provided with the 00019 // distribution. 00020 // 00021 // Neither the name of TotalEmbedded nor the names of its 00022 // contributors may be used to endorse or promote products derived 00023 // from this software without specific prior written permission. 00024 // 00025 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00026 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00027 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00028 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00029 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00030 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00031 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00032 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00033 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00034 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00035 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00036 // POSSIBILITY OF SUCH DAMAGE. 00037 // 00038 00039 #ifndef GDBRDP_H 00040 #define GDBRDP_H 00041 00042 // 00043 // PROTOTYPES 00044 // 00045 int fGDBRDP_Handler (int i_socket); 00046 int fGDBRDP_InputHandler (int i_socket, char c_byte); 00047 int fGDBRDP_CommandInterpreter (int i_socket, char *pc_command, unsigned int ui_size); 00048 void fGDBRDP_SendToGDB (int i_socket, char *pc_message, unsigned int ui_length); 00049 int fGDBRDP_ConvertNibble (char c_nibble); 00050 char fGDBRDP_CalculateNibble (int i_nibble); 00051 int fGDBRDP_HandleHardwareBreakpoint (char *pc_command, unsigned int ui_size); 00052 int fGDBRDP_HandleSoftwareBreakpoint (char *pc_command, unsigned int ui_size); 00053 00054 // 00055 // DEFINES 00056 // 00057 #define dGDBRDP_INPUT_IDLE 0x01 00058 #define dGDBRDP_OUT_OF_SYNC 0x02 00059 #define dGDBRDP_OUT_OF_SYNC_2 0x03 00060 #define dGDBRDP_RECEIVE_COMMAND 0x04 00061 #define dGDBRDP_GET_CHECKSUM 0x05 00062 #define dGDBRDP_GET_CHECKSUM_2 0x06 00063 00064 #define dGDBRDP_START_OF_COMMAND '$' 00065 #define dGDBRDP_END_OF_COMMAND '#' 00066 #define dGDBRDP_ACK '+' 00067 #define dGDBRDP_NACK '-' 00068 #define dGDBRDP_CTRLC 0x03 00069 00070 #define dGDBRDP_MAX_CMD_BUFFER 384 00071 00072 #define dGDBRDP_MAX_SW_BREAKPOINTS 25 00073 00074 extern unsigned int ui_ejtag_state; 00075 extern unsigned int ui_last_signal; 00076 #endif // #ifndef GDBRDP_H
1.5.6