Re: Using C++ code inside gdb

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 10 Oct 2015 17:32, Mike Frysinger wrote:
> On 09 Oct 2015 10:41, Pedro Alves wrote:
> > On 10/09/2015 07:08 AM, Ashutosh wrote:
> > > Regarding using C++, I just hit upon the following conversation on the
> > > gdb-patches list:
> > > https://sourceware.org/ml/gdb-patches/2015-02/msg00202.html
> > > 
> > > where it seems that there's some work going on compiling gdb sources
> > > with g++. Any idea if this support is available in some form already
> > > in gdb 7.10 or when is it planned to be released?
> > 
> > The status in the wiki page linked from that url is accurate.
> > 
> > GDB nowadays builds and links in C++ when configured
> > with --enable-build-with-cxx, though that still spews a ton of warnings.
> > There's been constant incremental progress so we'll get there eventually.
> > 
> > No release has been marked as the one where we'll switch to C++ as
> > default language -- it'll get done when it's done; though the sooner
> > the better.  :-)
> 
> even if the C++ frontend is used, and C++ is the default language, that doesn't
> mean that all C++ functionality will be accepted.  there are a lot of design
> patterns and C++ APIs that are generally bad, and gdb is meant to be portable.
> so i'd expect there will be guidelines put together as to acceptable standards
> base (C11/C14/etc...) as well as headers and interfaces that are permitted and
> ones that are banned.

seems like gcc has already done this:
	https://gcc.gnu.org/codingconventions.html

probably be best to try and follow that, or at least use it as a base.
-mike
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWGiRrAAoJEEFjO5/oN/WBIdsP/2fovge447kDor9kgxBZR+PO
gpwu0QwaxntJtqNYQiAf1Bwfun9tbe/dGlm0maLNV9MeufScO3xwJ1Lii9aMTu+M
1pDq+KhBH6MPmfVUtPvarhv5mRbEH9KM1jMN879S/ERKsKwKbkdJ4gLd1xt6tNvn
lSWic74quE21f7czaj54eT1d+Hhm/QitvTFdEgFHLWNxZRJx3aCSCGmTa7+uzbPA
zYXqQnOcJXhAsjOvkce7i6Kw/4pBxPVaUfge312a1xOxsO2nkiFb6ZQgKiEVgdTX
Byf0yW/bV345N6xJ2YLQ60WYYTuKqzoJK5gBSSOQkvClfmZQl5Uq45urJCN1RIK3
5aoFN1oQSclVVPHLH/o3T/n949SoWyu78E/fKpKmF1PCKSnFwQ3WQshrdsj5oQX2
mDb622FMDKlpftHiou3mlGyuVwvBdyDobMYMnvnGagOkY6KAONdFeF3g8lGDvXct
qdQLH554/jcM9A2ReqSvV5Zy5IdjK59wLvyUP97Sv5JBDnu4Wtl/Kn/yNZgpWJtk
tdTEhvRYG3TGKXrQwok2af4LKZGsDSDlUWNv/VXc3NBdURVtPho2jfFut4vkO5lk
7V6Df0n0GoAE9Jh+3rin06MmG60MUWU/xcAy2feyqNElKIYGg3moRjh1d5VQF3Sp
9/eDZu6B22+7emcLJND6
=LVST
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.