troubleshotting the backtrace code
This commit is contained in:
@ -2414,7 +2414,8 @@ static HAK_INLINE int do_throw (hak_t* hak, hak_oop_t val, hak_ooi_t ip)
|
||||
/* output backtrace */
|
||||
HAK_LOG0(hak, HAK_LOG_IC | HAK_LOG_INFO, "[BACKTRACE]\n");
|
||||
c = hak->active_context;
|
||||
while ((hak_oop_t)c != hak->_nil) {
|
||||
while ((hak_oop_t)c != hak->_nil)
|
||||
{
|
||||
f = c->base;
|
||||
if (f->dbgi != hak->_nil)
|
||||
{
|
||||
@ -2425,7 +2426,8 @@ static HAK_INLINE int do_throw (hak_t* hak, hak_oop_t val, hak_ooi_t ip)
|
||||
hak_loc_t loc;
|
||||
hak_ooi_t cip;
|
||||
|
||||
cip = HAK_OOP_TO_SMOOI(c->ip);
|
||||
/* use the given ip for the active context instead of the value from the ip field */
|
||||
cip = (c == hak->active_context)? ip: HAK_OOP_TO_SMOOI(c->ip);
|
||||
dbgi = (hak_dbgi_t*)HAK_OBJ_GET_BYTE_SLOT(f->dbgi);
|
||||
HAK_MEMSET(&loc, 0, HAK_SIZEOF(loc));
|
||||
loc.file = dbgi[cip].fname;
|
||||
|
@ -166,14 +166,15 @@ printf "%O\n" (k:basicAt 20)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
##try {
|
||||
printf ">>>>>>>>>>>>>>>\n"
|
||||
(Q:k)
|
||||
} catch (e) {
|
||||
##} catch (e) {
|
||||
printf "EXCEPTION: %O\n" e
|
||||
|
||||
try {
|
||||
## try {
|
||||
throw 10000
|
||||
} catch (e) {
|
||||
printf "EXCEPTION-X: %O\n" e
|
||||
}
|
||||
}
|
||||
## } catch (e) {
|
||||
## printf "EXCEPTION-X: %O\n" e
|
||||
## }
|
||||
##}
|
||||
|
Reference in New Issue
Block a user