[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why gdb inside emacs cannot print out c++ object?
From: |
Kevin Gao |
Subject: |
Re: Why gdb inside emacs cannot print out c++ object? |
Date: |
Fri, 15 Mar 2019 16:46:30 -0700 |
Seems sth wrong with my machine. Sorry for the false report.
May I ask a related question? In the local windows, instead of showing the
value, it shows "<complex data type>". Is it possible to show the value of
c++ object? (eg a std::map's value)
Thanks,
Kevin
On Thu, Mar 14, 2019 at 8:00 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Kevin Gao <kkegao@gmail.com>
> > Date: Thu, 14 Mar 2019 00:04:29 -0700
> >
> > Suppose: p is c++ iterator of an object of multimap<int, pair<string,
> > string>>;
> >
> > inside emacs gdb (with many windows on), "p p" returns:
> > *$1 = {_M_node = 0x555555775fa0}*, which is meaningless to me.
> >
> > As a comparison, in raw gdb (etc gdb ./a.out), "p p" returns:
> > *$1 = {first = 1, second = {first = "foo", second = "bar"}}*, which is
> what
> > I want to see.
> >
> > Why gdb inside emacs cannot print out c++ object? Seems emacs does some
> > special setting which turns off c++ mode?
>
> Does it work if you invoke GDB with "M-x gud-gdb" instead of "M-x gdb"?
>
>