Support --debug option for GNU/Linux emulation.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 10 Oct 2017 05:36:34 +0000 (14:36 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 10 Oct 2017 05:36:34 +0000 (14:36 +0900)
ChangeLog
chopstx
src/main.c

index bac4040..e93d331 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-10  NIIBE Yutaka  <gniibe@fsij.org>
+
+       * src/main.c (main): Support --debug option.
+       * chopstx: Update to 1.5.
+
 2017-10-06  NIIBE Yutaka  <gniibe@fsij.org>
 
        * src/configure (flash_override): Fix suggested by Jeremy Drake.
diff --git a/chopstx b/chopstx
index c08044e..96d2a81 160000 (submodule)
--- a/chopstx
+++ b/chopstx
@@ -1 +1 @@
-Subproject commit c08044e22bc5477b27820d1f526b49bdcf9ba436
+Subproject commit 96d2a81331a43c920045ba0d3850caffac85a123
index 1cdaee1..f6fca44 100644 (file)
@@ -240,6 +240,13 @@ main (int argc, const char *argv[])
       exit (0);
     }
 
+  if (argc >= 2 && !strncmp (argv[1], "--debug=", 8))
+    {
+      debug = strtol (&argv[1][8], NULL, 10);
+      argc--;
+      argv++;
+    }
+
   if (argc >= 2 && !strncmp (argv[1], "--vidpid=", 9))
     {
       extern uint8_t device_desc[];