harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r618542 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src/util: ipf/base/native_stack_ipf.cpp ipf/base/signals_arch.cpp linux/signals_ipf.cpp
Date Tue, 05 Feb 2008 04:59:36 GMT
Author: varlax
Date: Mon Feb  4 20:59:35 2008
New Revision: 618542

URL: http://svn.apache.org/viewvc?rev=618542&view=rev
Log:
Applied HARMONY-5455  [drlvm][signals] IPF build is failed to run because of absent symbol

Added:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/signals_arch.cpp   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/native_stack_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/native_stack_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/native_stack_ipf.cpp?rev=618542&r1=618541&r2=618542&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/native_stack_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/native_stack_ipf.cpp Mon Feb
 4 20:59:35 2008
@@ -24,7 +24,6 @@
 void native_get_frame_info(Registers* regs, void** ip, void** bp, void** sp)
 {
     // FIXME: not implemented
-    abort();
 }
 
 bool native_unwind_bp_based_frame(void* frame, void** ip, void** bp, void** sp)

Added: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/signals_arch.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/signals_arch.cpp?rev=618542&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/signals_arch.cpp (added)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/signals_arch.cpp Mon Feb  4 20:59:35
2008
@@ -0,0 +1,46 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+#include <stdio.h>
+#include "vm_core_types.h"
+
+void print_reg_state(Registers* regs)
+{
+    fprintf(stderr, "Registers:");
+
+    for (int gn = 0; gn < 8; gn++)
+    {
+        fprintf(stderr, "\n    GR %2d-%2d:", gn*4, (gn+1)*4 - 1);
+        for (int gc = 0; gc < 4; gc++)
+             fprintf(stderr, " 0x%"W_PI_FMT, regs->gr[gn*4 + gc]);
+    }
+
+    for (int bn = 0; bn < 2; bn++)
+    {
+        fprintf(stderr, "\n    BR %2d-%2d:", bn*4, (bn+1)*4 - 1);
+        for (int bc = 0; bc < 4; bc++)
+             fprintf(stderr, " 0x%"W_PI_FMT, regs->br[bn*4 + bc]);
+    }
+        
+    fprintf(stderr, "\n");
+    fprintf(stderr, "    preds: 0x%"W_PI_FMT"\n", regs->preds);
+    fprintf(stderr, "     nats: 0x%"W_PI_FMT"\n", regs->nats);
+    fprintf(stderr, "      pfs: 0x%"W_PI_FMT"\n", regs->pfs);
+    fprintf(stderr, "      bsp: 0x%"W_PI_FMT"\n", (POINTER_SIZE_INT)regs->bsp);
+    fprintf(stderr, "     *bsp: 0x%"W_PI_FMT"\n", regs->bsp ? (*regs->bsp) : 0);
+    fprintf(stderr, "       ip: 0x%"W_PI_FMT"\n", regs->ip);
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/signals_arch.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp?rev=618542&r1=618541&r2=618542&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp Mon Feb  4 20:59:35
2008
@@ -434,7 +434,18 @@
 { 
     ucontext_t *uc = (ucontext_t *)context;
     Global_Env *env = VM_Global_State::loader_env;
+    Registers regs;
+    ucontext_to_regs(&regs, uc);
 
+    if (!p_TLS_vmthread)
+    {
+        if (!is_gdb_crash_handler_enabled() ||
+            !gdb_crash_handler(&regs))
+        {
+            // print stack trace
+            sd_print_stack(&regs);
+        }
+    }
 
     /* Will not compile on IPF:
      TRACE2("signals", "NPE or SOE detected at " <<
@@ -452,8 +463,6 @@
         }
     }
     fprintf(stderr, "SIGSEGV in VM code.\n");
-    Registers regs;
-    ucontext_to_regs(&regs, uc);
 
     // setup default handler
     signal(signum, SIG_DFL);



Mime
View raw message