From: j8takagi Date: Sun, 17 Feb 2019 08:13:08 +0000 (+0900) Subject: comet2monitorのダンプで引数のない場合は0から#40までダンプ X-Git-Tag: v0.5p9~16 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aa16a883a8dd67f8a35e928f09ed879c6c95677;p=YACASL2.git comet2monitorのダンプで引数のない場合は0から#40までダンプ --- diff --git a/src/monitor.c b/src/monitor.c index 99e27d8..205c4d1 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -227,7 +227,7 @@ void mon_break(int argc, char *argv[]) void mon_dump(int argc, char *argv[]) { int i = 0, j; - WORD start = 0, end = 0xFFFF; + WORD dump_start = 0, dump_end = 0x40; if(argc > 0 && stracmp(argv[0], 2, (char* []){"a", "auto"})) { execmode.dump = true; i++; @@ -236,11 +236,10 @@ void mon_dump(int argc, char *argv[]) i++; } if(argc > i) { - start = execmode.dump_start = nh2word(argv[i++]); + dump_start = execmode.dump_start = nh2word(argv[i++]); if(argc > i) { - end = execmode.dump_end = nh2word(argv[i++]); + dump_end = execmode.dump_end = nh2word(argv[i++]); } - dumpmemory(start, end); if(argc > i) { for(j = i; j < argc; j++) { if(j > i) { @@ -251,6 +250,7 @@ void mon_dump(int argc, char *argv[]) fprintf(stderr, ": ignored.\n"); } } + dumpmemory(dump_start, dump_end); } MONCMDTYPE monitorcmd(char *cmd, MONARGS *args)