arch/ all assertion functions: up_assert move the register dump to first make the more important info first

This commit is contained in:
Xiang Xiao
2018-11-11 12:53:59 -06:00
committed by Gregory Nutt
parent dfe788be25
commit 543f4ed8ec
18 changed files with 76 additions and 76 deletions
+14 -14
View File
@@ -144,6 +144,20 @@ static void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
if (g_current_regs != NULL)
{
up_registerdump((uint32_t*)g_current_regs);
}
else
{
/* Capture and dump user registers by hand */
up_saveusercontext(s_last_regs);
up_registerdump(s_last_regs);
}
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@@ -218,20 +232,6 @@ static void up_dumpstate(void)
up_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
if (g_current_regs != NULL)
{
up_registerdump((uint32_t*)g_current_regs);
}
else
{
/* Capture and dump user registers by hand */
up_saveusercontext(s_last_regs);
up_registerdump(s_last_regs);
}
#ifdef CONFIG_ARCH_USBDUMP
/* Dump USB trace data */