return command_error;
length = (int) end - (int) start + 1;
status = ccdbg_read_memory(s51_dbg, start + 0xff00, memory, length);
+ (void) status;
dump_bytes(memory, length, start, "0x%02x ");
return command_success;
}
return command_error;
length = (int) end - (int) start + 1;
status = ccdbg_read_sfr(s51_dbg, start, memory, length);
+ (void) status;
dump_bytes(memory, length, start, "0x%02x ");
return command_success;
}
return command_error;
length = (int) end - (int) start + 1;
status = ccdbg_read_memory(s51_dbg, start, memory, length);
+ (void) status;
dump_bytes(memory, length, start, "0x%04x ");
return command_success;
}
enum command_result
command_file (int argc, char **argv)
{
- struct hex_file *hex;
- struct hex_image *image;
+ struct ao_hex_file *hex;
+ struct ao_hex_image *image;
FILE *file;
if (argc != 2)
file = fopen (argv[1], "r");
if (!file)
return command_error;
- hex = ccdbg_hex_file_read(file, argv[1]);
+ hex = ao_hex_file_read(file, argv[1]);
fclose(file);
if (!hex)
return command_error;
if (hex->nrecord == 0) {
- ccdbg_hex_file_free(hex);
+ ao_hex_file_free(hex);
return command_error;
}
- image = ccdbg_hex_image_create(hex);
- ccdbg_hex_file_free(hex);
+ image = ao_hex_image_create(hex);
+ ao_hex_file_free(hex);
start_address = image->address;
ccdbg_set_rom(s51_dbg, image);
return command_success;
enable_breakpoint(b);
}
-enum command_result
+static enum command_result
set_breakpoint(uint16_t address, int temporary)
{
int b;
- uint8_t status;
for (b = 0; b < CC_NUM_BREAKPOINTS; b++) {
if (breakpoints[b].enabled == 0)
break;
return command_success;
}
-enum command_result
+static enum command_result
clear_breakpoint(uint16_t address, int temporary)
{
int b;
- uint8_t status;
for (b = 0; b < CC_NUM_BREAKPOINTS; b++) {
if (breakpoints[b].enabled != 0 &&
}
-int
+static int
find_breakpoint(uint16_t address)
{
int b;
enum command_result
command_clear (int argc, char **argv)
{
- int b;
uint16_t address;
enum command_result result;
return clear_breakpoint(address, 0);
}
-void
+static void
cc_stopped(uint8_t status)
{
uint16_t pc;
}
}
-uint8_t
+static uint8_t
cc_step(uint16_t pc)
{
int b;
{
char *filename = argv[1];
FILE *file;
- struct hex_file *hex;
- struct hex_image *image;
+ struct ao_hex_file *hex;
+ struct ao_hex_image *image;
if (!filename)
return command_error;
perror(filename);
return command_error;
}
- hex = ccdbg_hex_file_read(file, filename);
+ hex = ao_hex_file_read(file, filename);
fclose(file);
if (!hex) {
return command_error;
}
- image = ccdbg_hex_image_create(hex);
- ccdbg_hex_file_free(hex);
+ image = ao_hex_image_create(hex);
+ ao_hex_file_free(hex);
if (!image) {
fprintf(stderr, "image create failed\n");
return command_error;
} else {
fprintf(stderr, "Can only load to RAM\n");
}
- ccdbg_hex_image_free(image);
+ ao_hex_image_free(image);
return command_success;
}
info_breakpoints(int argc, char **argv)
{
int b;
- uint16_t address;
- enum command_result result;
if (argc == 1) {
s51_printf("Num Type Disp Hit Cnt Address What\n");
}
return command_success;
}
-
+ return command_syntax;
}
static enum command_result