From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10661 invoked by alias); 6 Dec 2007 16:23:02 -0000 Received: (qmail 10649 invoked by uid 22791); 6 Dec 2007 16:23:01 -0000 X-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 06 Dec 2007 16:22:57 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lB6GMsxQ007720 for ; Thu, 6 Dec 2007 11:22:54 -0500 Received: from pobox-2.corp.redhat.com (pobox-2.corp.redhat.com [10.11.255.15]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lB6GMs0O003299 for ; Thu, 6 Dec 2007 11:22:54 -0500 Received: from localhost.localdomain (vpn-6-25.fab.redhat.com [10.33.6.25]) by pobox-2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lB6GMqhm020256 for ; Thu, 6 Dec 2007 11:22:53 -0500 Message-ID: <475821DC.3030801@redhat.com> Date: Thu, 06 Dec 2007 16:23:00 -0000 From: Phil Muldoon User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Frysk Hackers Subject: libunwind Cursor.step() return values Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00209.txt.bz2 I've been looking at a fd 0 close when opening a corefile on x86 via fhpd. The last few of the console trace are: -Dec-07 10:13:10 AM lib.unwind.Cursor FINE: lib.unwind.Cursor@54e690 Create Cursor 6-Dec-07 10:13:10 AM lib.unwind.UnwindX86 step FINE: lib.unwind.UnwindX86@376460 step cursor: 0x1ccc00 6-Dec-07 10:13:10 AM frysk.stack.LibunwindAddressSpace findProcInfo FINE: Entering findProcInfo, ip: 804854a 6-Dec-07 10:13:10 AM frysk.stack.LibunwindAddressSpace getElfImage FINE: frysk.stack.LibunwindAddressSpace@28ab40 Entering getElfImage, addr: 0x804854a 6-Dec-07 10:13:10 AM frysk.stack.LibunwindAddressSpace getElfImage FINEST: Handling regular map name: 6-Dec-07 10:13:10 AM frysk.stack.LibunwindAddressSpace getElfImage FINER: Leaving getElfImage 6-Dec-07 10:13:10 AM frysk.stack.LibunwindAddressSpace findProcInfo FINEST: Obtained elfImage: Bad Elf Image, ret: -1 6-Dec-07 10:13:10 AM lib.unwind.UnwindX86 createProcInfoFromElfImage FINE: lib.unwind.UnwindX86@376460 Pre unw_get_unwind_table 6-Dec-07 10:13:10 AM lib.unwind.UnwindX86 createProcInfoFromElfImage FINE: lib.unwind.UnwindX86@376460 Post unw_get_unwind_table 6-Dec-07 10:13:10 AM frysk.stack.LibunwindAddressSpace findProcInfo FINE: post procInfo ProcInfo Error: -1 6-Dec-07 10:13:10 AM lib.unwind.Cursor unwind FINEST: lib.unwind.Cursor@42dac8, unwind, step returned: -1 And the exception returned after that is: (fhpd) ERROR: Could not read from command line Bad file descriptorException in thread "main" frysk.sys.Errno$Ebadf: tcsetattr: Bad file descriptor (fd 0) at frysk.sys.termios.Termios.set(fhpd) at frysk.sys.termios.Termios.set(fhpd) at frysk.util.PtyTerminal$1.start(fhpd) at java.lang.Runtime.runShutdownHooks(libgcj.so.8rh) at java.lang.Runtime.exitNoChecks(libgcj.so.8rh) at java.lang.Runtime.exitNoChecksAccessor(libgcj.so.8rh) Looking at: ~/frysk/frysk-sys/lib/unwind/Cursor.java I see this code in question: public Cursor unwind() { logger.log(Level.FINE, "{0}, unwind\n", this); //XXX: Don't unwind if no more, or unknown frames. if (step == 0 || getIP() == 0) return null; Cursor newCursor = new Cursor(addressSpace, unwinder.copyCursor(cursor), unwinder); step = newCursor.step(); logger.log(Level.FINEST, "{0}, unwind, step returned: {1}\n", new Object[] {this, new Integer(step)}); if (step > 0) return newCursor; return null; } I see that step == 0 means no more or unknown frames. Further down the: step = newCursor.step() returns -1 in this case. What does that mean in this case? Regards Phil