From: twisti Date: Thu, 9 Nov 2006 09:54:00 +0000 (+0000) Subject: * src/vm/jit/powerpc/linux/md-os.c (vm/jit/profile/profile.h): Changed X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=69de596f415e9507f4fc6d31221c76cfeb663296;p=cacao.git * src/vm/jit/powerpc/linux/md-os.c (vm/jit/profile/profile.h): Changed to vm/jit/optimizing/profile.h. (md_signal_handler_sigsegv): If faulting address is not equal 0, try to dump a tsacktrace and exit. --- diff --git a/src/vm/jit/powerpc/linux/md-os.c b/src/vm/jit/powerpc/linux/md-os.c index 201830b87..c3f5ad36a 100644 --- a/src/vm/jit/powerpc/linux/md-os.c +++ b/src/vm/jit/powerpc/linux/md-os.c @@ -26,9 +26,7 @@ Authors: Christian Thalinger - Changes: - - $Id: md-os.c 5274 2006-08-24 09:29:44Z tbfg $ + $Id: md-os.c 5939 2006-11-09 09:54:00Z twisti $ */ @@ -52,7 +50,7 @@ #include "vm/jit/asmpart.h" #if defined(ENABLE_PROFILING) -# include "vm/jit/profile/profile.h" +# include "vm/jit/optimizing/profile.h" #endif #include "vm/jit/stacktrace.h" @@ -84,22 +82,24 @@ void md_signal_handler_sigsegv(int sig, siginfo_t *siginfo, void *_p) reg = (instr >> 16) & 0x1f; addr = _mc->gregs[reg]; - if (addr == 0) { - pv = (u1 *) _mc->gregs[REG_PV]; - sp = (u1 *) _mc->gregs[REG_SP]; - ra = (u1 *) _mc->gregs[PT_LNK]; /* this is correct for leafs */ - xpc = (u1 *) _mc->gregs[PT_NIP]; + pv = (u1 *) _mc->gregs[REG_PV]; + sp = (u1 *) _mc->gregs[REG_SP]; + ra = (u1 *) _mc->gregs[PT_LNK]; /* this is correct for leafs */ + xpc = (u1 *) _mc->gregs[PT_NIP]; + if (addr == 0) { _mc->gregs[REG_ITMP1_XPTR] = (ptrint) stacktrace_hardware_nullpointerexception(pv, sp, ra, xpc); _mc->gregs[REG_ITMP2_XPC] = (ptrint) xpc; _mc->gregs[PT_NIP] = (ptrint) asm_handle_exception; + } + else { + codegen_get_pv_from_pc(xpc); + + /* this should not happen */ - } else { - throw_cacao_exception_exit(string_java_lang_InternalError, - "Segmentation fault: 0x%08lx at 0x%08lx", - addr, _mc->gregs[PT_NIP]); + assert(0); } }