Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Christian Biesinger via gdb" <gdb@sourceware.org>
To: noloader@gmail.com
Cc: gdb@sourceware.org
Subject: Re: GDB does not recognize cxx extension?
Date: Sun, 29 Sep 2019 05:09:00 -0000	[thread overview]
Message-ID: <CAPTJ0XFYtm-ngCHsc40_VqH61G80d2JWqVao_p5CYr0JAHR3QA@mail.gmail.com> (raw)
In-Reply-To: <CAH8yC8nWS-oFKVOLR1=924a2X_RSwV6j8+keyJHb1tgvqpqEsQ@mail.gmail.com>

On Sun, Sep 29, 2019 at 12:01 AM Jeffrey Walton <noloader@gmail.com> 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_<TAB>
>     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.


       reply	other threads:[~2019-09-29  5:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAH8yC8nWS-oFKVOLR1=924a2X_RSwV6j8+keyJHb1tgvqpqEsQ@mail.gmail.com>
2019-09-29  5:09 ` Christian Biesinger via gdb [this message]
2019-09-29  5:17   ` Jeffrey Walton
2019-09-29  5:51     ` Christian Biesinger via gdb
2019-09-29  6:49       ` Jeffrey Walton
2019-09-29 15:48         ` Christian Biesinger via gdb
2019-09-29 21:23     ` Ruslan Kabatsayev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPTJ0XFYtm-ngCHsc40_VqH61G80d2JWqVao_p5CYr0JAHR3QA@mail.gmail.com \
    --to=gdb@sourceware.org \
    --cc=cbiesinger@google.com \
    --cc=noloader@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox