https://github.com/virtualagc/virtualagc
Revision 66d8e606a8d996ded60bc81d5edf319142a5fad9 authored by Ron Burkey on 04 October 2021, 11:49:55 UTC, committed by Ron Burkey on 04 October 2021, 11:49:55 UTC
2 parent s dfc2190 + 42c2282
Raw File
Tip revision: 66d8e606a8d996ded60bc81d5edf319142a5fad9 authored by Ron Burkey on 04 October 2021, 11:49:55 UTC
Merge branch 'master' of https://github.com/virtualagc/virtualagc
Tip revision: 66d8e60
agc_gdbmi.h
#ifndef AGC_GDBMI_H
#define AGC_GDBMI_H

#include "agc_debug.h"

#define GDBMI_MAX_CUSTOM_CMDS 32
#define GDBMI_MAX_CUSTOM_ARGS 10

/**
 * typde definiyion to tell the simulator what action to take
 */
typedef enum
{
	GdbmiCmdUnhandled,
	GdbmiCmdError,
	GdbmiCmdDone,
	GdbmiCmdNext,
	GdbmiCmdStep,
	GdbmiCmdContinue,
	GdbmiCmdRun,
	GdbmiCmdQuit = 0xfe,
} GdbmiResult;

typedef struct
{
   char* Command;
   char* Arguments[GDBMI_MAX_CUSTOM_ARGS];
} CustomCommand_t;

typedef struct
{
	char* Command;
	GdbmiResult (*Handler)(int);
} GdbmiCommands_t;

typedef struct
{
  int       count; /* Repeat: default is 1 */
  char      fmt;   /* Format: x,d,u,o,t,a,c,f,s default is u */
  char      unit;  /* Unit: (b)ytes (h)alfword (w)word (g)iant words */
  unsigned  addr;  /* The last memory starting address */
  int       apl;   /* Addresses per line */
} GdbmiExamCfg_t;

typedef char GdbmiFmt_t;

extern void GdbmiDisplayBreakpointForLine(SymbolLine_t* Line,int BreakpointId );
extern GdbmiResult GdbmiInterpreter(agc_t* , char*, char* );
extern void GdbmiPrintFullNameContents(SymbolLine_t *Line);
extern GdbmiResult GdbmiHandleDelete(int k);
void GdbmiPrintFullNameFrame(SymbolLine_t *Line);
void GdbmiPrintSourceFrame(SymbolLine_t *Line);

//#define GDBMI_FUNC(f) GdbmiResult gdbmi ## f(agc_t *State , char* s, char* sraw)
//#define GDBMI_CALL(f,i) if(gdbmi_status == gdbmiCmdUnhandled)gdbmi_status = gdbmi ## f (State,s+i,sraw+i)

extern int gdbmi_sigint;
extern char* SymbolFile;
extern char* SourcePathName;

#endif
back to top