Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HowTo: debugging java and jnilib simultaneously in XCode 2.1




1. you have to have two XCode 2.1 projects 1 for java target and 1 for jnilib
for java target executable setup java debugger
for jnilib target executable - GDB debugger but UNCHECK Start executable after starting debugger

2. start java executable with debugger (set breakpoint at the first line of the main

3. open console for jnilib project and start native debugger
debugger should stop and you'll see in the console:

.....
Program loaded.
(gdb)


4. find the pid of your java process with
ps -auxww | grep java


5. from native project console (gdb console) write 
    run

6. click on the pause button of the native debugger window
 
7. from native project console (gdb console) write 
    kill

8. from native project console (gdb console) write
    attach <pid>
where pid is a number you found earlier


good luck and enjoy your debugging :-)

thank you very much to guys from Java and XCode team that helped me to figure out how to do that



   

Dmitry Markman


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.