From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 506 invoked by alias); 27 Mar 2009 15:33:19 -0000 Received: (qmail 32469 invoked by uid 22791); 27 Mar 2009 15:33:18 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Mar 2009 15:33:13 +0000 Received: from zps38.corp.google.com (zps38.corp.google.com [172.25.146.38]) by smtp-out.google.com with ESMTP id n2RFXBL6018386 for ; Fri, 27 Mar 2009 08:33:11 -0700 Received: from wf-out-1314.google.com (wfc25.prod.google.com [10.142.3.25]) by zps38.corp.google.com with ESMTP id n2RFXATs019141 for ; Fri, 27 Mar 2009 08:33:10 -0700 Received: by wf-out-1314.google.com with SMTP id 25so1754118wfc.22 for ; Fri, 27 Mar 2009 08:33:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.178.9 with SMTP id a9mr951340wff.88.1238167989978; Fri, 27 Mar 2009 08:33:09 -0700 (PDT) In-Reply-To: <22737823.post@talk.nabble.com> References: <22737823.post@talk.nabble.com> Date: Fri, 27 Mar 2009 15:33:00 -0000 Message-ID: <8ac60eac0903270833u7b38c03o2aee62a8c5365090@mail.gmail.com> Subject: Re: Help with Code in Multiple Directories From: Paul Pluzhnikov To: Nirf Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true 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: 2009-03/txt/msg00180.txt.bz2 On Fri, Mar 27, 2009 at 1:43 AM, Nirf wrote: > I'm trying to get started with GDB but am having great trouble. On what platform? Using which version of GDB? Note that on Linux, or any other platform that uses DWARF debug format, you shouldn't need to specify 'directory ...' at all if you build and debug on the same machine: compiler already supplies all the info GDB needs to find sources regardless of where in file system they are located. > However when I type in a command like "list sourcecodename:5" it does not > find the source code regardless of which file name I insert for > sourcecodename. Did you build your program with debugging info (the '-g' GCC option) ? Cheers, -- Paul Pluzhnikov