From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53111 invoked by alias); 29 Sep 2019 05:09:32 -0000 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 Received: (qmail 52487 invoked by uid 89); 29 Sep 2019 05:09:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.1 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1159, H*f:924a2X_RSwV6j8, H*f:sk:keyJHb1, H*f:sk:CAH8yC8 X-HELO: mail-ot1-f53.google.com Received: from mail-ot1-f53.google.com (HELO mail-ot1-f53.google.com) (209.85.210.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 29 Sep 2019 05:09:30 +0000 Received: by mail-ot1-f53.google.com with SMTP id m19so5683944otp.1 for ; Sat, 28 Sep 2019 22:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8RNw8wwraqJbA7h+vZzmRpfH9T7naHH4R5G+MW2td6Y=; b=VpfYl3AC2HL6JOZ84yfhq1/VS8vInUy/Yu1NyU6YxrmaycfkempRPtdbBwWZvd+i6b en51UIjoz31NjFnrQuJ0gX3g+7ftpyuYCD3BLIOd7d+l8u+Pr3tAdV1+jYBibon5hth8 NGIvX0UBew+YxazCBMCnYsfcQ9oHp7TGPT5wVCHTEg6Mc//s9C22taaol9wokk3YqcCD 9uFEw4hjyW/H2cZiV8kAbfBGsaaTklsEpRqjtmGVjlThww62EFtcgqVfg1HWdkOyT4Pw ijbN/4MCOWYeunviAJxngS0Ct4Efaf1HQzxlqlj3qJZg32iom2G3OgzJcQgu7bR9pRJJ 9xKw== MIME-Version: 1.0 References: In-Reply-To: From: "Christian Biesinger via gdb" Reply-To: Christian Biesinger Date: Sun, 29 Sep 2019 05:09:00 -0000 Message-ID: Subject: Re: GDB does not recognize cxx extension? To: noloader@gmail.com Cc: gdb@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00029.txt.bz2 On Sun, Sep 29, 2019 at 12:01 AM Jeffrey Walton wrote: > I've got a C++ program built from a source called pem_test.cxx. I'm > having trouble getting GDB to accept it. Autocomplete does not work: > > (gdb) b pem_ > pem_common.cpp pem_common.h pem_read.cpp pem_write.cpp GDB gets the list of files from the debug data in the binary, not from the current directory. Are you sure you compiled pem_test.cxx into the binary? Christian > And breakpoints don't work: > > (gdb) b pem_test.cxx : 85 > No source file named pem_test.cxx. > Make breakpoint pending on future shared library load? (y or [n]) > > The file is in PWD: > > (gdb) shell ls *.cxx > pem_test.cxx test.cxx > > I'm working on Ubuntu 18.04, using "GCC (Ubuntu > 7.4.0-1ubuntu1~18.04.1)", "GDB (Ubuntu 8.1-0ubuntu3.1)", and > CXXFLAGS="-DDEBUG -g3 -O0 -Wall". > > Searching the mailing list returns spurious hits: > https://sourceware.org/cgi-bin/search.cgi?wm=wrd&form=extended&m=all&s=D&ul=%2Fml%2Fgdb%2F%25&q=cxx%20extension > > How do I have have GDB recognize the cxx extension as a C++ source file? > > Thanks in advance.