From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32191 invoked by alias); 21 Sep 2007 22:21:40 -0000 Received: (qmail 32183 invoked by uid 22791); 21 Sep 2007 22:21:40 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.227) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 21 Sep 2007 22:21:33 +0000 Received: by wx-out-0506.google.com with SMTP id s7so745683wxc for ; Fri, 21 Sep 2007 15:21:31 -0700 (PDT) Received: by 10.90.88.13 with SMTP id l13mr3044042agb.1190413291157; Fri, 21 Sep 2007 15:21:31 -0700 (PDT) Received: by 10.90.69.9 with HTTP; Fri, 21 Sep 2007 15:21:31 -0700 (PDT) Message-ID: Date: Fri, 21 Sep 2007 22:39:00 -0000 From: costin_c To: gdb@sourceware.org Subject: break on a external source file MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes 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/msg00175.txt.bz2 How can I tell to gdb to put a breakpoint on a given line in C++ source file, located in directory situated other than current one ? $cat -n main.cc 1 #include 2 int 3 main(int argc, char **argv) 4 { 5 Print P(100); 6 P.print(); 7 return 0; 8 } $ cat -n dir/print.h 1 #ifndef PRINT_H 2 3 class Print 4 { 5 private: 6 int val; 7 public: 8 Print(int v); 9 void print(); 10 }; 11 12 #endif $ cat -n dir/print.cc 1 #include 2 #include 3 4 Print::Print(int v) 5 { 6 val=v+v; 7 }; 8 9 void Print::print() 10 { 11 std::cout<