From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22620 invoked by alias); 8 Jul 2005 14:09:58 -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 22243 invoked by uid 22791); 8 Jul 2005 14:09:49 -0000 Received: from hoemail1.lucent.com (HELO hoemail1.lucent.com) (192.11.226.161) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 08 Jul 2005 14:09:49 +0000 Received: from nbgif1.de.lucent.com (h135-246-31-82.lucent.com [135.246.31.82]) by hoemail1.lucent.com (8.12.11/8.12.11) with ESMTP id j68E9jtT027485 for ; Fri, 8 Jul 2005 09:09:46 -0500 (CDT) Received: from sfsws1.de.lucent.com (sfsws1 [135.246.31.38]) by nbgif1.de.lucent.com (8.11.7p1+Sun/8.11.7) with ESMTP id j68E9iv11355 for ; Fri, 8 Jul 2005 16:09:45 +0200 (MEST) Received: from sfsw51.de.lucent.com (sfsw51 [135.246.72.99]) by sfsws1.de.lucent.com (8.11.7p1+Sun/8.8.5) with ESMTP id j68E9i214371 for ; Fri, 8 Jul 2005 16:09:44 +0200 (MEST) Received: (from kzeitler@localhost) by sfsw51.de.lucent.com (8.11.7p1+Sun/8.8.8) id j68E9ip28116; Fri, 8 Jul 2005 16:09:44 +0200 (MEST) To: gdb@sources.redhat.com Subject: Re: gdb needs full C++ function signature to set a breakpoint References: <20050707185717.GA11441@nevyn.them.org> From: Klaus Zeitler Emacs: freely redistributable; void where prohibited by law. Date: Fri, 08 Jul 2005 14:09:00 -0000 In-Reply-To: <20050707185717.GA11441@nevyn.them.org> (Daniel Jacobowitz's message of "Thu, 7 Jul 2005 14:57:17 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-07/txt/msg00082.txt.bz2 I figured out the difference between my small example and the big image. For the example image gdb correctly recognizes the program as C++, i.e. says: "The current source language is "auto; currently c++"." whereas for the real image gdb claims, that it's c. So a simple "set lang c++" is all that was needed. Now I would like to know why gdb thinks that this is a c image. Could it be that gdb decides that by searching main()? Some time ago somebody had the clever idea to link our image with a library for testing that contained a 2nd main() in a c file. To avoid linker errors he made main() a weak symbol. When I remove this 2nd main() function, the linker now finds the original main() function in a c++ file and now gdb identifies the image as C++. Klaus -- ------------------------------------------ | Klaus Zeitler Lucent Technologies | | Email: kzeitler@lucent.com | ------------------------------------------ --- I have made this letter longer than usual because I lack the time to make it shorter. -- Blaise Pascal