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

View File

@ -199,6 +199,10 @@ static void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -283,10 +287,6 @@ static void up_dumpstate(void)
up_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
up_registerdump();
#ifdef CONFIG_ARCH_USBDUMP
/* Dump USB trace data */

View File

@ -236,6 +236,10 @@ static void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -336,10 +340,6 @@ static void up_dumpstate(void)
}
#endif
/* Then dump the registers (if available) */
up_registerdump();
/* Dump the state of all tasks (if available) */
up_showtasks();

View File

@ -240,6 +240,10 @@ static void up_dumpstate(void)
uint32_t kstackbase = 0;
#endif
/* Dump the CPU registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -364,10 +368,6 @@ static void up_dumpstate(void)
_alert("CPU%d:\n", up_cpu_index());
#endif
/* Then dump the CPU registers (if available) */
up_registerdump();
/* Dump the state of all tasks (if available) */
up_showtasks();

View File

@ -244,6 +244,10 @@ static void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -358,10 +362,6 @@ static void up_dumpstate(void)
_alert("CPU%d:\n", up_cpu_index());
#endif
/* Then dump the registers (if available) */
up_registerdump();
/* Dump the state of all tasks (if available) */
up_showtasks();

View File

@ -236,6 +236,10 @@ static void up_dumpstate(void)
uint32_t kstackbase = 0;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -343,10 +347,6 @@ static void up_dumpstate(void)
#endif
}
/* Then dump the registers (if available) */
up_registerdump();
/* Dump the state of all tasks (if available) */
up_showtasks();

View File

@ -169,6 +169,10 @@ void up_dumpstate(void)
uint16_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -267,10 +271,6 @@ void up_dumpstate(void)
up_stackdump(sp, ustackbase);
}
#endif
/* Then dump the registers (if available) */
up_registerdump();
}
#endif /* CONFIG_ARCH_STACKDUMP */

View File

@ -135,6 +135,10 @@ void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -233,9 +237,5 @@ void up_dumpstate(void)
up_stackdump(sp, ustackbase);
}
#endif
/* Then dump the registers (if available) */
up_registerdump();
}
#endif

View File

@ -193,6 +193,10 @@ static void up_dumpstate(void)
uint16_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -267,10 +271,6 @@ static void up_dumpstate(void)
up_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
up_registerdump();
#ifdef CONFIG_ARCH_USBDUMP
/* Dump USB trace data */

View File

@ -148,6 +148,10 @@ void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -221,10 +225,6 @@ void up_dumpstate(void)
{
up_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
up_registerdump();
}
#endif /* CONFIG_ARCH_STACKDUMP */

View File

@ -144,6 +144,10 @@ void lm32_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -217,10 +221,6 @@ void lm32_dumpstate(void)
{
up_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
up_registerdump();
}
#endif /* CONFIG_ARCH_STACKDUMP */

View File

@ -241,6 +241,10 @@ static void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -341,10 +345,6 @@ static void up_dumpstate(void)
}
#endif
/* Then dump the registers (if available) */
up_registerdump();
/* Dump the state of all tasks (if available) */
up_showtasks();

View File

@ -160,6 +160,10 @@ void up_dumpstate(void)
uint16_t istacksize;
#endif
/* Dump the registers (if available) */
m16c_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -239,10 +243,6 @@ void up_dumpstate(void)
{
m16c_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
m16c_registerdump();
}
#endif /* CONFIG_ARCH_STACKDUMP */

View File

@ -150,6 +150,10 @@ void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
sh1_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -223,10 +227,6 @@ void up_dumpstate(void)
{
sh1_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
sh1_registerdump();
}
#endif /* CONFIG_ARCH_STACKDUMP */

View File

@ -153,6 +153,10 @@ void up_dumpstate(void)
uint32_t istacksize;
#endif
/* Dump the registers (if available) */
up_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -226,10 +230,6 @@ void up_dumpstate(void)
{
up_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
up_registerdump();
}
#endif /* CONFIG_ARCH_STACKDUMP */

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 */

View File

@ -208,6 +208,10 @@ void xtensa_dumpstate(void)
_alert("CPU%d:\n", up_cpu_index());
#endif
/* Dump the registers (if available) */
xtensa_registerdump();
/* Get the limits on the user stack memory */
if (rtcb->pid == 0)
@ -292,10 +296,6 @@ void xtensa_dumpstate(void)
xtensa_stackdump(sp, ustackbase);
}
/* Then dump the registers (if available) */
xtensa_registerdump();
/* Dump the state of all tasks (if available) */
up_showtasks();

View File

@ -177,8 +177,8 @@ void up_assert(void)
#endif
#endif
up_stackdump();
up_registerdump();
up_stackdump();
#ifdef CONFIG_ARCH_USBDUMP
/* Dump USB trace data */

View File

@ -176,8 +176,8 @@ void up_assert(void)
#endif
#endif
up_stackdump();
REGISTER_DUMP();
up_stackdump();
#ifdef CONFIG_ARCH_USBDUMP
/* Dump USB trace data */