harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Volosyuk" <ivan.volos...@gmail.com>
Subject Re: [classlib][launcher][drlvm] Running vm inside gdb
Date Sat, 23 Sep 2006 11:05:44 GMT
On 9/23/06, Geir Magnusson Jr. <geir@pobox.com> wrote:
>
> On Sep 23, 2006, at 6:00 AM, Ivan Volosyuk wrote:
>
> > I have found a solution to this issue. As before, it helps to setup
> > LD_LIBRARY_PATH before running launcher.
>
> Lets be clear - it only helped to setup LD_LIBRARY_PATH before for
> reasons unknown.  W/o my recent change, it worked fine on Ubuntu 6
> but not on Suse...

It works fine on my gentoo. The only thing. Look at the paths. First
one without trailing slash, the second with it. This should be exactly
the same after the check is fixed. :) I don't know the reason for
that, so I have left this intact.

>
> > If it finds required PATHs it
> > doesn't re-execute itself. Pathes looks like:
> > path[0] = /home/ivan/svn/drlvm/trunk/build/deploy/jre/bin/default
> > path[1] = /home/ivan/svn/drlvm/trunk/build/deploy/jre/bin/
> >
> > BTW, I have found a bug in the path checks. Giving only first path
> > will satisfy the condition in the code and will prevent execv(), but
> > VM will fail to run:
>
> Ha!  yes, of course.  My bad.  Obviously if the needed path is a
> substring of a path that's already there, it does the wrong thing.
> Doh :)
>
> > export #LD_LIBRARY_PATH=/home/ivan/svn/drlvm/trunk/build/deploy/jre/
> > bin/default
> > #./deploy/jre/bin/java Test
> > java/lang/UnsatisfiedLinkError : Failed loading library
> > "libhyzlib.so": DSO load failed
> >
> > I'm working on the fix.
>
> Ok.  I think it's straightforward - look to see if the full string is
> there by seeing if
>
>    *(ptr + strstr() + 1) == either null or separator
Will not work. We should do this in loop at least. If we found another
variant of the path it will fail the check. I have made the correct
fix. Look at https://issues.apache.org/jira/browse/HARMONY-1557.
>
>
> Back to the issue - this means that we can't debug across the execv()?

We don't.

--
Ivan

>
> geir
>
>
> > --
> > Ivan
> >
> > On 9/23/06, Nikolay Kuznetsov <nikolay.kuznetsov@gmail.com> wrote:
> >> Yes, I've seen the same, please keep us informed if you find a
> >> solution.
> >>
> >> On 9/23/06, Ivan Volosyuk <ivan.volosyuk@gmail.com> wrote:
> >> > GNU gdb 6.4
> >> >
> >> > Attaching is ok, but it is not quite convinient to do attaching
> >> when
> >> > running small test, I prefer: gdb --args prog args... but it no
> >> longer
> >> > works for me after switch to new launcher.
> >> > --
> >> > Ivan
> >> >
> >> > On 9/23/06, Sunny Chan <mailinglist@sunnychan.org.uk> wrote:
> >> > > Which version of gdb are you using? Older version of gdb
> >> doesn't play along well
> >> > > with nptl or java launcher which spawn another process.
> >> > >
> >> > > Try running your java program first and attach gdb to the
> >> process.
> >> > >
> >> > > Ivan Volosyuk wrote:
> >> > > > I have problems running drlvm from gdb:
> >> > > >
> >> > > > (gdb) run
> >> > > > Starting program: /home/ivan/svn/drlvm/trunk/build/deploy/
> >> jre/bin/java Test
> >> > > > [Thread debugging using libthread_db enabled]
> >> > > > [New Thread -1214326592 (LWP 25698)]
> >> > > > [New Thread -1214510160 (LWP 25701)]
> >> > > > Cannot find user-level thread for LWP 25698: generic error
> >> > > >
> >> > > > Does anybody have seen the problem?

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message