mw_debug: Display terminated status when stopping
authorPaul Mackerras <paulus@ozlabs.org>
Tue, 22 Sep 2020 10:33:08 +0000 (20:33 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Fri, 15 Jan 2021 01:40:09 +0000 (12:40 +1100)
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
scripts/mw_debug/mw_debug.c

index 75b51af8695b32b3c3eb4349fc1488d8c4d899bb..d03e61c5de3f3b9013d5c0b3f5724b0c92451578 100644 (file)
@@ -390,9 +390,11 @@ static void core_status(void)
                        statstr2 = " (restarting?)";
                else if (stat & DBG_CORE_STAT_TERM)
                        statstr2 = " (terminated)";
-       } else if (stat & DBG_CORE_STAT_STOPPING)
+       } else if (stat & DBG_CORE_STAT_STOPPING) {
                statstr = "stopping";
-       else if (stat & DBG_CORE_STAT_TERM)
+               if (stat & DBG_CORE_STAT_TERM)
+                       statstr2 = " (terminated)";
+       } else if (stat & DBG_CORE_STAT_TERM)
                statstr = "odd state (TERM but no STOP)";
        printf("Core: %s%s\n", statstr, statstr2);
        printf(" NIA: %016" PRIx64 "\n", nia);