This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 2/7] Add libiberty/concat styled concat_path function

On 01/12/2017 03:08 PM, Philipp Rudo wrote:
> its quite obvious that you are pro C++. My own feelings are quite
> mixed. I must amid that the standard library is quite handy, at least
> when it works. Debugging it is quite a pain.

There's definitely lots of scope for making C++ debugging less painful.
I think 2017 will see good advancements here.  For example, with the
palves/cp-linespec branch on my github, setting breakpoints in C++ methods
is soooooo much easier, mainly because I've made linespec tab completion
Just Work.  The whole "compile" feature for C++ (making use of g++ for
the parsing, via the libcc1 plugin) should be making it upstream this year.

Keep in mind that a significant (if not the largest) chunk of
our users is using GDB to debug their C++ code too.  So in a sense,
any pain we now may feel, a good chunk of our users have been feeling
for a long while.  We just hadn't been dogfooding.

> But the syntax sometimes
> is unreadable, especially when you use those teplates containing
> templates using types is different namespaces.

OTOH, stepping through C code that emulates templates using
C #defines OTOH is just plain impossible, since all of it
is compiled down to a single source line...  So in that sense,
I think debugging C++ is better than C here.

It also helps if you're using a distro that installs pretty printers
for the standard library correctly.  Fedora does.  Ubuntu didn't use
to, but I don't know the current state.

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]