mirror of
https://github.com/digarok/gsplus.git
synced 2024-11-05 18:08:32 +00:00
ubuntu, debian, etc, have outdated version of re2c. imagine that.
This commit is contained in:
parent
926e9b7e47
commit
817792f94d
@ -74,7 +74,7 @@ add_custom_command(
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT debug_shell.c
|
||||
COMMAND re2c -T -W -o ${CMAKE_CURRENT_BINARY_DIR}/debug_shell.c "${CMAKE_CURRENT_SOURCE_DIR}/debug_shell.re2c"
|
||||
COMMAND re2c -W -o ${CMAKE_CURRENT_BINARY_DIR}/debug_shell.c "${CMAKE_CURRENT_SOURCE_DIR}/debug_shell.re2c"
|
||||
MAIN_DEPENDENCY debug_shell.re2c
|
||||
)
|
||||
|
||||
|
@ -611,19 +611,17 @@ void delete_bp(int type, word32 addr) {
|
||||
if (breakpoints[i] == addr) break;
|
||||
}
|
||||
|
||||
if (i == num_breakpoints) return; /* not set */
|
||||
breakpoints[i] = 0;
|
||||
breakpoints[i] = breakpoints[--num_breakpoints];
|
||||
|
||||
switch(type) {
|
||||
case 'B': g_num_bp_breakpoints = num_breakpoints; break;
|
||||
case 'M': g_num_mp_breakpoints = num_breakpoints; break;
|
||||
}
|
||||
|
||||
if (i == num_breakpoints) return; /* not set */
|
||||
breakpoints[i] = 0;
|
||||
breakpoints[i] = breakpoints[--num_breakpoints];
|
||||
|
||||
qsort(breakpoints, num_breakpoints, sizeof(word32), addr_cmp);
|
||||
fixup_brks();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -664,14 +662,12 @@ static int parse_command(const char *cp) {
|
||||
|
||||
const char *YYCURSOR = cp;
|
||||
const char *YYMARKER = NULL;
|
||||
const char *ptr = NULL;
|
||||
//const char *ptr = NULL;
|
||||
|
||||
int addr = 0;
|
||||
int has_bank = 0;
|
||||
int has_addr = 0;
|
||||
|
||||
/*!stags:re2c format = "const char *@@;\n"; */
|
||||
|
||||
while (*cp == ' ') ++cp;
|
||||
|
||||
/*!re2c
|
||||
@ -759,6 +755,7 @@ static int parse_command(const char *cp) {
|
||||
}
|
||||
*/
|
||||
indir:
|
||||
cp = YYCURSOR;
|
||||
/* only gets here if address specified */
|
||||
for(;;) {
|
||||
/*!re2c
|
||||
@ -783,6 +780,7 @@ indir:
|
||||
}
|
||||
|
||||
command:
|
||||
cp = YYCURSOR;
|
||||
/*!re2c
|
||||
* { return -1; }
|
||||
|
||||
@ -857,8 +855,8 @@ command:
|
||||
return 1;
|
||||
}
|
||||
|
||||
";bp" @ptr [+-]? end {
|
||||
char plus = *ptr;
|
||||
";bp" [+-]? end {
|
||||
char plus = cp[3];
|
||||
if (!has_addr && plus == 0) { show_bp('B'); return 0; }
|
||||
if (!has_addr) return -1;
|
||||
if (!has_bank) addr |= (engine.kpc & 0xff0000);
|
||||
@ -867,8 +865,8 @@ command:
|
||||
return 0;
|
||||
}
|
||||
|
||||
";mp" @ptr [+-]? end {
|
||||
char plus = *ptr;
|
||||
";mp" [+-]? end {
|
||||
char plus = cp[3];
|
||||
if (!has_addr && plus == 0) { show_bp('M'); return 0; }
|
||||
if (!has_addr) return -1;
|
||||
if (!has_bank) addr |= (engine.kpc & 0xff0000);
|
||||
|
Loading…
Reference in New Issue
Block a user