harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Egor Pasko <egor.pa...@gmail.com>
Subject Re: [drlvm] Trouble Building DRLVM
Date Tue, 26 Sep 2006 03:16:58 GMT
On the 0x1F0 day of Apache Harmony Gregory Shimansky wrote:
> On Friday 22 September 2006 14:31 Egor Pasko wrote:
> > what makes me really nervous is that I cannot debug in GDB on Linux
> > (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
> >
> > When GDB starts, it becomes broken right after the start:
> > [New Thread 1080397952 (LWP 13879)]
> > [New Thread 1083603888 (LWP 13882)]
> > Cannot find user-level thread for LWP 13879: generic error
> >
> > Did anybody come across this problem recently? I googled a little, but
> > could not find any valuable comments. I remember, there was no such
> > problem in older days!! Is that our new ThreadManager that does things
> > like this? or is it something else?
> 
> I've seen in another thread. The problem with gdb is caused because process 
> reexecs itself with new environment (there is no other way known to tell 
> dynamic linker to use a library path). This is new launcher feature necessary 
> to get rid of java shell script and use a real executable.
> 
> Ivan Volosyuk investigated the conditions when launcher performs execing 
> itself to set LD_LIBRARY_PATH and it appears (unless fixed recently) that you 
> need to set LD_LIBRARY_PATH=<HDK path>/bin/:<HDK path>/bin/default. Don't

> forget a tailing slash in the first path :)
> 
> Anyway, to get the correct LD_LIBRARY_PATH which launcher wants you can get it 
> from /proc/`pidof java`/environ if you launch a simple java program and catch 
> its reexeced environment. If LD_LIBRARY_PATH contents is equal to what 
> launcher wants, reexecing doesn't happen and this allows normal debugging.

Thanks, Gregory! I saw Ivan's resolution and appreciate his work. Tried
that yesterday, and it worked. Great!

> I think we should document this since it is going to stay for a long time and 
> is really required for development on Linux.

+1 (!!) we need to document this. BTW, I have my own collection of GDB
tricks that could be useful when debugging. Some of them significantly
help me from time to time. I would like to contribute them to Harmony.

I would suggest to make a special HOWTO or "Getting Started" for
DRLVM's Linux debugging. It might seem too specific, but we have a lot
to tell here, and, IMHO, this is a strong reason to make a separate
doc.

How to document? My ideas:
* start from Wiki, when it matures, move to the website
* make a JIRA with a patch introducing a new, text-only documentation
  file, like README
* start JIRA with exact patch to the website (probably, it is not the
  easiest way, though, Nadya has a HOWTO for that)

Any suggestions?

-- 
Egor Pasko, Intel Managed Runtime Division


---------------------------------------------------------------------
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