public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bryce McKinlay <bmckinlay@gmail.com>
To: majia gm <gmmajia@gmail.com>
Cc: Java List <java@gcc.gnu.org>, gcc-help@gcc.gnu.org
Subject: Re: Must unwind in gcc be ported for gcj?
Date: Thu, 24 Feb 2011 10:07:00 -0000	[thread overview]
Message-ID: <AANLkTikhSKnAVuKpGhsdOd1pzxC4ZbLwtu7CVDC+n5t3@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin-ZzjX2EA5HcxCe_a2UuwcexJzAgDaV8namDFz@mail.gmail.com>

On Thu, Feb 24, 2011 at 1:19 AM, majia gm <gmmajia@gmail.com> wrote:
> 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?
>

Have a look at SJLJ_EXCEPTIONS. This should allow you to get something
working without having to port the full unwinder.

Bryce

      parent reply	other threads:[~2011-02-24 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24  1:19 majia gm
2011-02-24  2:34 ` David Daney
2011-02-24 10:07 ` Bryce McKinlay [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikhSKnAVuKpGhsdOd1pzxC4ZbLwtu7CVDC+n5t3@mail.gmail.com \
    --to=bmckinlay@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gmmajia@gmail.com \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).