Greetings,
I have a test of libunwind running on my mips target. It seems the the
unw_step api always returns > 0. This results in my backtrace loop never
terminating.
Any thoughts on why this would happen ?
Thanks !
-Lenny
I am using 1.5.0.
[BACKTRACE] (1) main:140
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
[BACKTRACE] (1) _init:736
void show_backtrace(void)
{
char symbol[256];
unw_cursor_t cursor;
unw_context_t context;
unw_getcontext(&context);
unw_init_local(&cursor, &context);
int Cursor_Result = 0;
int n = 0;
while((Cursor_Result = unw_step(&cursor)) > 0)
{
unw_word_t ip;
unw_word_t sp;
unw_word_t off;
unw_get_reg(&cursor, UNW_REG_IP, &ip);
unw_get_reg(&cursor, UNW_REG_SP, &sp);
memset(&symbol, 0, sizeof(symbol));
if (unw_get_proc_name(&cursor, &symbol[0], sizeof(symbol), &off) == 0)
{
fprintf(stdout, "[BACKTRACE] (%d) %s:%d \n", Cursor_Result,
&symbol[0], off);
}
if(n++ > 10)
break;
}
}
This e-mail message and any files attached may contain information that iRobot
Corporation considers confidential and/or proprietary or may later designate as
confidential and proprietary. If you are not the intended recipient, please
contact the sender and delete the email immediately. Unauthorized use or
distribution is strictly prohibited.