<p>I'd expect to need the source code to make sense from the gdb output, and maybe also to get the debug symbols.</p>
<p>I thunk I already found at least part of the code path in the source, why shouldn't I take advantage of this info?</p>
<p>What I wanted to know in my original question is whether anyone in this forum have been through the process of downloading and compiling this source code - which file should I download (I found multiple repositories on the official source web site) and where are useful practical steps to compile it with debug symbols?</p>
<p>Thanks!</p>
<p>Amos </p>
<div class="gmail_quote">On Oct 9, 2012 10:41 PM, "Elazar Leibovich" <<a href="mailto:elazarl@gmail.com">elazarl@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Why do you need the Java source for that? Can't you use gdb, find out the the address of the mmap'ed area, and add a watchpoint there (scripted to log access and continue).<br><br><div class="gmail_quote">
On Tue, Oct 9, 2012 at 1:06 PM, Amos Shapira <span dir="ltr"><<a href="mailto:amos.shapira@gmail.com" target="_blank">amos.shapira@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>Thanks to both of you.</p>
<p>To give more details of what I'm after - I want to know whether the class bytecode address points into the mmap(2)'ed jar file or into malloc(3)'ed memory. I think I found part of the code path inside the jdk source which does this and now I'm trying to determine what are the situations in which each option is taken.<br>
Can JMX do that? The code I'm looking at is written in pure C.</p><span><font color="#888888">
<p>Amos</p></font></span><div><div>
<div class="gmail_quote">On Oct 9, <a href="tel:2012" value="+9722012" target="_blank">2012</a> 10:00 PM, "Jonathan Ben Avraham" <<a href="mailto:yba@tkos.co.il" target="_blank">yba@tkos.co.il</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Amos,<br>
I did something like this with the JarSigner code in order to reverse engineer it in C, which in the end I was able to do. IMHO, gdb is too high a granularity to get anything usable out of the JVM execution. I suspect that there is no alternative to sowing System.out.print's throughout the code.<br>
Regards,<br>
<br>
- yba<br>
<br>
<br>
On Tue, 9 Oct <a href="tel:2012" value="+9722012" target="_blank">2012</a>, Amos Shapira wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Date: Tue, 9 Oct <a href="tel:2012" value="+9722012" target="_blank">2012</a> 10:57:29 +1100<br>
From: Amos Shapira <<a href="mailto:amos.shapira@gmail.com" target="_blank">amos.shapira@gmail.com</a>><br>
To: linux-il <<a href="mailto:linux-il@cs.huji.ac.il" target="_blank">linux-il@cs.huji.ac.il</a>><br>
Subject: Looking for directions about compiling and tracing OpenJDK<br>
<br>
Hi,<br>
<br>
I have an idea which involves going somewhat deep into the bowls of the Java Jar class loader when using the official Oracle JDK 6 (and soon 7).<br>
To verify this I started looking at the JDK source code but it's not small and I'd like to try to trace through it while it executes Java programs.<br>
<br>
Does anyone here have experience in doing something like this and can give me some useful pointers on how to do this?<br>
<br>
I'd like to be able to do "gdb java -jar HelloWorld.jar" and single-step through the class loader while it loads HelloWorld.jar.<br>
<br>
Thanks,<br>
<br>
--Amos<br>
<br>
<br>
<br>
</blockquote>
<br>
-- <br>
EE 77 7F 30 4A 64 2E C5 83 5F E7 49 A6 82 29 BA ~. .~ Tk Open Systems<br>
=}----------------------------<u></u>--------------------ooO--U--<u></u>Ooo------------{=<br>
- <a href="mailto:yba@tkos.co.il" target="_blank">yba@tkos.co.il</a> - tel: <a href="tel:%2B972.2.679.5364" value="+97226795364" target="_blank">+972.2.679.5364</a>, <a href="http://www.tkos.co.il" target="_blank">http://www.tkos.co.il</a> -<br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il" target="_blank">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
<br></blockquote></div><br></div>
</blockquote></div>