From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30192 invoked by alias); 4 May 2010 13:23:29 -0000 Received: (qmail 30168 invoked by uid 22791); 4 May 2010 13:23:27 -0000 X-SWARE-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sainfoin-out.extra.cea.fr (HELO sainfoin-out.extra.cea.fr) (132.166.172.107) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 04 May 2010 13:23:16 +0000 Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by sainfoin.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.0) with ESMTP id o44DNDS8023855 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 4 May 2010 15:23:13 +0200 Received: from muguet2.intra.cea.fr (muguet2.intra.cea.fr [132.166.192.7]) by pisaure.intra.cea.fr (8.14.4/8.14.4) with ESMTP id o44DNDEL010070 for ; Tue, 4 May 2010 15:23:13 +0200 (envelope-from anton.moukharski@cea.fr) Received: from [132.167.0.51] ([132.167.0.51]) by muguet2.intra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.1) with ESMTP id o44DNDQ4005836 for ; Tue, 4 May 2010 15:23:13 +0200 Message-ID: <4BE01FC1.8050309@cea.fr> Date: Tue, 04 May 2010 13:23:00 -0000 From: Anton MOUKHARSKI User-Agent: Thunderbird 2.0.0.17 (X11/20080926) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Breakpoint not hit because of function pointers or something similar Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2010-05/txt/msg00010.txt.bz2 Hello, I am trying to hit a breakpoint that appears early in the code, but gdb (ddd) misses it each time. At first I thought it was because of templates, but gdb seems to cope with that. I have a code similar to this one (C++, don't read it in detail at first) : int main(int argc,const char **argv) { ABM proc(params...); proc.execute(fileinr); return EXIT_SUCCESS; } And the main code where I want my breakpoint is : template bool doit( Process & process, const string & fileinr, Finder & ) { //stuff return(1); } The link between the two is somewhere here : ABM, which is a child of Process, contains the following code in it's (only) constructor : registerProcessType( "Volume", "S8", &doit ); registerProcessType( "Volume", "U8", &doit ); registerProcessType( "Volume", "S16", &doit ); registerProcessType( "Volume", "U16", &doit ); registerProcessType( "Volume", "S32", &doit ); registerProcessType( "Volume", "U32", &doit ); registerProcessType( "Volume", "FLOAT", &doit ); registerProcessType( "Volume", "DOUBLE", &doit ); registerProcessType( "Volume", "RGB", &doit ); registerProcessType( "Volume", "RGBA", &doit ); Process' execute function is given below : bool Process::execute( const string & filename ) { Finder f; if( !f.check( filename ) ) { f.launchException(); throw format_error( filename ); return( false ); } return( execute( f, filename ) ); } bool Process::execute( Finder & f, const string & filename ) { string otype = f.objectType(); string dtype = f.dataType(); map >::const_iterator ip = _execs.find( otype ); if( ip == _execs.end() ) { throw datatype_format_error( string( "unsupported data type " ) + otype + " / " + dtype, filename ); return( false ); } map::const_iterator ip2 = (*ip).second.find( dtype ); if( ip2 == (*ip).second.end() ) { // Try alternate data types vector posstypes = f.possibleDataTypes(); unsigned i, n = posstypes.size(); for( i=0; i