GDB does not recognize cxx extension?

Ruslan Kabatsayev b7.10110111@gmail.com
Sun Sep 29 21:23:00 GMT 2019


Hi,

On Sun, 29 Sep 2019 at 08:18, Jeffrey Walton <noloader@gmail.com> wrote:
>
> On Sun, Sep 29, 2019 at 1:09 AM Christian Biesinger
> <cbiesinger@google.com> wrote:
> >
> > 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?
>
> Yes. A 'b main' stops in pem_test.cxx.
>
> The recipe to build pem_test.cxx is at
> https://github.com/noloader/cryptopp-pem/blob/master/pem_create_keys.sh#L42

This line:
"$CXX" "$CXXFLAGS" pem_test.cxx ./libcryptopp.a -o pem_test.exe
passes "-DDEBUG -g3 -O0 -Wall" as a single option. So, it's the same
as -D"DEBUG -g3 -O0 -Wall". Thus the -g3 isn't passed as symbol
generation option. Try removing the quotes.

>
> Jeff

Regards,
Ruslan



More information about the Gdb mailing list