From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22405 invoked by alias); 24 Feb 2011 01:19:58 -0000 Received: (qmail 22388 invoked by uid 22791); 24 Feb 2011 01:19:57 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_GC X-Spam-Check-By: sourceware.org Received: from mail-fx0-f47.google.com (HELO mail-fx0-f47.google.com) (209.85.161.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Feb 2011 01:19:53 +0000 Received: by fxm8 with SMTP id 8so56477fxm.20 for ; Wed, 23 Feb 2011 17:19:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.81.76 with SMTP id w12mr250642fak.26.1298510390939; Wed, 23 Feb 2011 17:19:50 -0800 (PST) Received: by 10.223.79.68 with HTTP; Wed, 23 Feb 2011 17:19:50 -0800 (PST) Date: Thu, 24 Feb 2011 01:19:00 -0000 Message-ID: Subject: Must unwind in gcc be ported for gcj? From: majia gm To: Java List Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00004.txt.bz2 Hi, everyone. I'm porting gcj (gcc-4.4.2) to another platform. Right now the gij fails when interpreting the following program. File A.java: import B; public class A{ public static void main(String args[]) { try{ B b=(B)Class.forName("B").newInstance(); catch(Exception e) { System.out.println("Cannot find Class B"); } } } File B.java: public class B {} I use gdb to track gij, and I found GetCallingClass() in forName() returns NULL, then the bootstrap loader is used to search the Class B but with no result. Should the Class B has the same class loader, the system class loader as the Class A dose? Then I track the GetCallingClass(), and I found it needs the unwind function provided by gcc. Must I port the unwind function?