From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7123 invoked by alias); 23 Feb 2005 16:57:54 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 7066 invoked from network); 23 Feb 2005 16:57:51 -0000 Received: from unknown (HELO hotmail.com) (64.4.49.8) by sourceware.org with SMTP; 23 Feb 2005 16:57:51 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 23 Feb 2005 08:56:01 -0800 Message-ID: Received: from 212.143.127.195 by by14fd.bay14.hotmail.msn.com with HTTP; Wed, 23 Feb 2005 16:55:15 GMT X-Originating-Email: [qwejohn@hotmail.com] X-Sender: qwejohn@hotmail.com From: "John Que" To: gdb@sources.redhat.com Bcc: Subject: debugging a core dump generated from Java with JNI Date: Wed, 23 Feb 2005 17:25:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 23 Feb 2005 16:56:01.0762 (UTC) FILETIME=[8E11EC20:01C519C8] X-SW-Source: 2005-02/txt/msg00150.txt.bz2 Hello, I am developing a java application which calls a procedure in "C" using JNI. It is developed on a Linux RedHat 9 x86 intel box. Sometimes this procedure crashes and a coredeump (core.pid) file is created. So I wanted to know how to debug it; So i changed that "c" method so the only thing it does now is call abort() so it will make a core dump. I had build my c code with -g flag. When I opened gdb like thus: gdb /usr/java/usr/java/j2sdk1.4.2_06/bin/java core.pid and performedc bt I did not see source code; So I upgraded to latest version of gdb (6.3) and tried again. what I see is : Core was generated by `/opt/JBuilderX/jdk1.4/bin/java -classpath /work/dev/transcode/release:/opt/JBui'. Program terminated with signal 6, Aborted. #0 0x400a9671 in ?? () Setting up the environment for debugging gdb. Function "internal_error" not defined. Function "info_command" not defined. No breakpoint number 0. (gdb) (gdb) (gdb) (gdb) (gdb) bt #0 0x400a9671 in ?? () #1 0x40035afd in ?? () #2 0x0000426e in ?? () #3 0x00000006 in ?? () #4 0x00000001 in ?? () #5 0x4003c378 in ?? () #6 0x00000006 in ?? () #7 0x4d34ceb0 in ?? () #8 0x4d34cd2c in ?? () #9 0x40035e9b in ?? () #10 0x0002c00c in ?? () #11 0x00000006 in ?? () #12 0x00000001 in ?? () #13 0x00000000 in ?? () #14 0x401b6980 in ?? () #15 0x00000006 in ?? () #16 0x4d34cd4c in ?? () #17 0x400a9414 in ?? () #18 0x00000006 in ?? () #19 0x4d34ceb0 in ?? () #20 0x4d34cd4c in ?? () #21 0x40033f25 in ?? () #22 0x401b6980 in ?? () ---Type to continue, or q to quit---q Quit (gdb) Why am I not seeing source code so I can know where it occured ? what should I do in order to see the source code in a debug session with gdb and a crasg from java program running jni? Regads, John Q. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/