Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 14836 invoked from network); 20 Oct 2006 12:55:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Oct 2006 12:55:11 -0000 Received: (qmail 18231 invoked by uid 500); 20 Oct 2006 12:55:08 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 18195 invoked by uid 500); 20 Oct 2006 12:55:06 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 18184 invoked by uid 99); 20 Oct 2006 12:55:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 05:55:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.55.52.88] (HELO mga01.intel.com) (192.55.52.88) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 05:55:06 -0700 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by mga01.intel.com with ESMTP; 20 Oct 2006 05:54:45 -0700 Received: from fmsmsx332.fm.intel.com (HELO fmsmsx332.amr.corp.intel.com) ([132.233.42.148]) by fmsmga001.fm.intel.com with ESMTP; 20 Oct 2006 05:54:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,333,1157353200"; d="scan'208"; a="149467277:sNHT29738877" Received: from fmsmsx311.amr.corp.intel.com ([132.233.42.214]) by fmsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 20 Oct 2006 05:54:45 -0700 Received: from nnsmsx411.ccr.corp.intel.com ([10.125.16.19]) by fmsmsx311.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 20 Oct 2006 05:54:45 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Re: [drlvm] How to debug the drlvm with gdb? Date: Fri, 20 Oct 2006 16:54:29 +0400 Message-ID: <523F3D8D8C97554AA47E53DF1A05466A50592E@nnsmsx411.ccr.corp.intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Re: [drlvm] How to debug the drlvm with gdb? Thread-Index: Acb0QYl4HchHTYtMTzaSy2tIrEqcwgABG0og From: "Morozova, Nadezhda" To: X-OriginalArrivalTime: 20 Oct 2006 12:54:45.0297 (UTC) FILETIME=[EAEDAA10:01C6F446] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Egor, Thanks for a detailed an proactive response.=20 Surely, I think we can start accumulating new content on Wiki - this is more visible and editable than patches to website. When we're done with the bulk of content, I'll migrate the stable stuff to the site. > * Thaking the one above into account, I would suggest to start "Linux > debugging" on Wiki. Does it make sense to put it in the FAQ? How do > you like the idea of Harmony_Debug_Troubleshooting on Wiki? I do like the idea. However, I think, pure debug tips is one thing and troubleshooting debug is another. Now, troubleshooting debug is when pure debug doesn't work :) or so it seems. So, perhaps, the title of the suggested page can be changed. Summing up: the decision for now =3D Add new pages for Wiki =3D - Debugging on Linux - Egor has volunteered; anybody else? - Debugging on Windows - Mikhail has been recommended; how's that? Additional question: Can we have Debugging page for some basic relatively stable stuff and Advanced Tasks+Troubleshooting (hacks and things-that-should-not-be-there-but-are) in a separate page? Thank you,=20 Nadya Morozova =20 -----Original Message----- From: news [mailto:news@sea.gmane.org] On Behalf Of Egor Pasko Sent: Friday, October 20, 2006 4:16 PM To: harmony-dev@incubator.apache.org Subject: Re: [drlvm] How to debug the drlvm with gdb? On the 0x208 day of Apache Harmony Nadezhda Morozova wrote: > Egor,=20 > You're a treasure keeper, so many useful tips :)=20 Actually, I am not any more :) > As you mentioned yourself, this info should be on the website, and I > side with you on this. thank you for helping! > We actually have some debugging tips already: > http://incubator.apache.org/harmony/subcomponents/drlvm/debugging_VM_and > _JIT.html=20 > However, they don't mention the launcher and all those tiny little > things you mentioned, like the format of paths, etc. the doc is also > partially outdated (mentions ij).=20 To sum up my thoughts: * debugging_VM_and_JIT=20 + is outdated + covers both linux and windows debugging tips intermixed + has instructions for JET tracing (quite valid) * Let's make make it 2 separate docs: "Linux debugging" and "Windows debugging". A new guy reading one of these two docs will most likely not want to read another. The interection between the two would be rather small (promise) * I listed a number of linux quickstart HOWTOs which, I think, is a good base for the "Linux debugging" part. * Mikhail supports the MSVC project file(s) and can add something to "Windows debugging" doc (Mikhail, do you love technical writing?:) * Let's make the 3rd doc "DRLVM Advanced Debugging and Bug Isolation" (Some people around are having good ideas on it). JET traceing would move here. * there are some shortcomings (in both classlib and DRLVM) that do not allow us to enable a usable debug build quickly. And description falls into a category like "hack here and there if you like". That's not what the ideal instructions should be. Maybe, it makes sense to postpone the task until we enable default debug builds everywhere. * Thaking the one above into account, I would suggest to start "Linux debugging" on Wiki. Does it make sense to put it in the FAQ? How do you like the idea of Harmony_Debug_Troubleshooting on Wiki? did I forget something? > Do you think we can use this doc as the basis for storing more content? yes, as the basis to "Linux debugging" or for something that we find better. > Thank you,=20 > Nadya Morozova > =20 > -----Original Message----- > From: news [mailto:news@sea.gmane.org] On Behalf Of Egor Pasko > Sent: Friday, October 20, 2006 1:34 PM > To: harmony-dev@incubator.apache.org > Subject: Re: [drlvm] How to debug the drlvm with gdb? >=20 > On the 0x208 day of Apache Harmony Tonny Lau wrote: > > Hi, > >=20 > > I checked out the latest drlvm, and failed to set breakpoint when I > used > > gdb. It seems the > > > "harmony/enhanced/drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/ja > va" > > is copied from > "harmony/enhanced/classlib/trunk/deploy/jdk/jre/bin/java", > > i.e., it is not a debug version. Does anyone know how to debug it? > Thanks! >=20 > Oh! should be on the site!! some day .. some day .. >=20 > Yes, it's the launcher. It is taken from classlib (which is not built > in debug mode even if DRLVM is built in debug (=3Ddefault)). If you = want > to build the launcher in debug mode, change: > working_classlib/depends/build/makefile.include > (put -O0 -g instead of -O1) >=20 > pretty, huh? :) >=20 > to debug on linux you should export LD_LIBRARY_PATH for GDB: >=20 > export LD_LIBRARY_PATH=3D$jre/bin:$jre/bin/default > (you know what $jre is:) > (news is that tere should be no slashess at the end of each path, and no > soft links inside, surprize, surprize:) >=20 > then you can run GDB and, at least, see threads created, etc.. >=20 > DRLVM is quite distributed between shared libraries, so it is not easy > to set breakpoints somewhere in libraries' code. There are 2 > approaches:=20 > 1. drop asm("int3") in your code, rebuild and catch it via an > ordinary run from within GDB > 2. stop at position when nothing interesting happend, but all > libraries are loaded (my favourite) >=20 > for (2) I use 2 custom GDB scripts "hstart" and "hrun". "hstart" makes > the first stop on my favourite start point. "hrun" uses those > breakpoints to stop on the point with further runs in the GDB session. >=20 > To get these two, drop these lines into your ~/.gdbinit: > --------------------------------------- > define hstart > break main > run > break hysl_open_shared_library > continue > finish > disable > break compile_jit_a_method > continue > disable > end >=20 > define hrun > en 1 > run > en 2 > continue > finish > disable > en 3 > continue > disable > end > --------------------------------------- >=20 > good luck! ;) >=20 > --=20 > Egor Pasko, Intel Managed Runtime Division >=20 >=20 > --------------------------------------------------------------------- > 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 >=20 > --------------------------------------------------------------------- > 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 >=20 >=20 --=20 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 --------------------------------------------------------------------- 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