From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30254 invoked by alias); 20 Sep 2007 17:32:59 -0000 Received: (qmail 30245 invoked by uid 22791); 20 Sep 2007 17:32:59 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 20 Sep 2007 17:32:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 551B82AB6FF; Thu, 20 Sep 2007 13:32:49 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1dES6E4br6hB; Thu, 20 Sep 2007 13:32:49 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1C1992AB6F1; Thu, 20 Sep 2007 13:32:49 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 0E4A6E7B58; Thu, 20 Sep 2007 10:32:47 -0700 (PDT) Date: Thu, 20 Sep 2007 19:47:00 -0000 From: Joel Brobecker To: Carlos Eduardo Seo Cc: gdb@sourceware.org Subject: Re: Problems while debugging fortran Message-ID: <20070920173246.GJ16400@adacore.com> References: <46EB035B.4090802@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46EB035B.4090802@linux.vnet.ibm.com> User-Agent: Mutt/1.4.2.2i 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-09/txt/msg00162.txt.bz2 Carlos, > If I try to set a breakpoint by line number, gdb displays: > > No line xx in file "init.c" What command exactly did you use to set your breakpoint? Did you try: (gdb) break test.f:3 ? > However, it works if I set the breakpoint by function name (e.g. "break > this"). If I run the program, then clear all breakpoints and try to set > a breakpoint by line number, it'll work IF the line is within the scope > of that function (i.e. if I set "break this", I can't set a breakpoint > by line in the line "print *,i*2"). Perhaps it would be clearer if you could post annotated copies of your various GDB sessions (the ones that work, and the ones that don't). I think it'll be easier for us to help you. Are you using a recent snapshot from CVS? -- Joel