From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8423 invoked by alias); 12 Apr 2005 10:16:45 -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 8386 invoked from network); 12 Apr 2005 10:16:36 -0000 Received: from unknown (HELO post.ift.uib.no) (129.177.40.40) by sourceware.org with SMTP; 12 Apr 2005 10:16:36 -0000 Received: from termo1.fi.uib.no ([129.177.39.206] helo=termo1.fi.uib.no.ift.uib.no) by post.ift.uib.no with esmtp (Exim 3.36 #2) id 1DLIRb-0004d8-00 for gdb@sources.redhat.com; Tue, 12 Apr 2005 12:16:31 +0200 To: gdb@sources.redhat.com Subject: Setting breakpoint in src file located in different directory From: Joakim Hove Date: Tue, 12 Apr 2005 10:16:00 -0000 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-04/txt/msg00060.txt.bz2 Hello, I am running/debugging an executable in the path ~/RunPath The executable in question is built from sources located in many different directories. I (try) to set the breakpoints with the ~/.gdbinit file: break /home/fimm/cmu/hove/libdos/src/ehist.c:694 break /home/fimm/cmu/hove/Cluster/Apps/src/Potts/Potts.c:396 This should in my opinion the breakpoints in the two files listed. However when invoking gdb, I only get the message: No source file named /home/fimm/cmu/hove/libdos/src/ehist.c. No source file named /home/fimm/cmu/hove/Cluster/Apps/src/Potts/Potts.c. I have also tried splitting it in two with: directory /home/fimm/cmu/hove/libdos/src/ break ehist.c:694 directory /home/fimm/cmu/hove/Cluster/Apps/src/Potts/ break Potts.c:396 That succeeds for the file Potts.c (which is located in the directory as the executable, i.e. the the executable is not located in the path where gdb is invoked, gdb is invoked as: %bash gdb ../exe However the other file (ehist.c) still failed with the "No source file named ..." message. Any tips on how to resolve this would be greatly appreciated. Joakim -- Joakim Hove hove AT ift uib no / Tlf: +47 (55 5)8 27 90 / Stabburveien 18 Fax: +47 (55 5)8 94 40 / N-5231 Paradis http://www.ift.uib.no/~hove/ / 55 91 28 18 / 92 68 57 04