From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29712 invoked by alias); 13 Jun 2007 09:02:30 -0000 Received: (qmail 29704 invoked by uid 22791); 13 Jun 2007 09:02:29 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.173) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Jun 2007 09:02:26 +0000 Received: by ug-out-1314.google.com with SMTP id j40so389712ugd for ; Wed, 13 Jun 2007 02:02:23 -0700 (PDT) Received: by 10.82.186.5 with SMTP id j5mr626732buf.1181725343590; Wed, 13 Jun 2007 02:02:23 -0700 (PDT) Received: by 10.82.107.4 with HTTP; Wed, 13 Jun 2007 02:02:23 -0700 (PDT) Message-ID: <4a4b2c810706130202q35296aadxe139a0e8a305c7e6@mail.gmail.com> Date: Wed, 13 Jun 2007 09:02:00 -0000 From: "Saurabh Thukral" To: gdb@sourceware.org Subject: backtrace shows ?? instead of function names in gdb MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00101.txt.bz2 Hi all, While debugging a core file produced by a program, I found the following backtrace: #0 0x0000000000000000 in ?? () #1 0x000000010009e4c0 in stMesg () #2 0x000000010009e380 in stMhandler () #3 0x000000010088351c in stSchedule () #4 0x000000010087bd5c in stRun() #5 0x000000010008c030 in main () I am unable to understand the reason for gdb displaying ??() in frame #0 instead of a valid function name. System: SunOS 5.10 64 bit gdb version 5.3. This problem is encountered in gdb version 6.1 also. I tried to find a post related to this problem and came across the following post: http://sourceware.org/ml/gdb/2007-03/msg00167.html. The reason that was posted is reproduced below: >Because GDB could not figure out what came next. The library might be >too optimized and stripped, or the stack might be corrupt, or GDB >might have a bug, or some other operating system specific problem. I have a few queries 1. What is the meaning of too optimized ? Should we avoid compiling with highest level of optimisation - in that case we will be forgoing performance ? 2. Please suggest a solution by which such backtraces can be avoided ? Please help, Thanks, Saurabh