I'm trying to implementing a plug-in using AGDI with JTAG interface. But I can't get correct result of the expression in breakpoint when target program stopped. There's difficulty in dealing with break-point which has expression to caculate. Keil packages the breakpoint content in struct
struct AG_Bps { struct AG_Bps *next; struct AG_Bps *prev; UL32 type : 4; // ABREAK, CBREAK, WBREAK UL32 enabled : 1; // 1:=enabled, 0:=disabled UL32 ReCalc : 1; // recalc expr flag UL32 BytObj : 1; // WatchBrk: 0:=Bytes, 1:=Objects UL32 Adr; // Address (or Range) UL32 mSpace; // memory-space void *pV; // used on VTR-access breakpoints UL32 tsize; // WatchBrk: size of one object UL32 many; // WatchBrk: many objects or bytes U16 acc; // WatchBrk: 1:=Read, 2:=Write, 3:=ReadWrite U16 BitPos; // currently not used UL32 number; // BreakPoint-Number I32 rcount; // Break is taken when rcount = 1 I32 ocount; // Original Count void *ep; // conditional-Expression char *cmd; // Exec-Command char *Line; // Breakpoint-Expression Line for Display char *pF; // module file name UL32 nLine; // line number UC8 Opc[8]; // Opcode-Save Area for Monitors }; typedef struct AG_Bps AG_BP;
UINT n = pCbFunc(AG_CB_TRUEXPR, pB->ep);
pCbFunc (AG_CB_EXECCMD, "U $\n"); pCbFunc (AG_CB_PROGRESS, &ProgressBar);