Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb@sourceware.org
Subject: Re: GDB in C++
Date: Wed, 11 Jul 2007 21:04:00 -0000	[thread overview]
Message-ID: <20070711210402.GA26350@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20070702013529.GC6627@adacore.com>

On Mon, 02 Jul 2007 03:35:29 +0200, Joel Brobecker wrote:
...
> However, I think that requiring a C++ compiler will make it harder
> for some users to build GDB, just because C++ compilers are not
> always as readily available as C compilers.

For a completeness pointing out there exists GObject - OO system of Gnome,
built on a plain crossplatform C, with rich OO features incl. multiple
inheritance by interfaces, reference counting, weak references,
messaging/notifications (called signals/closures) etc.

http://developer.gnome.org/doc/API/2.0/gobject/
sample of GtkVBox inheriting GtkBox:
	http://svn.gnome.org/viewcvs/gtk%2B/trunk/gtk/gtkvbox.c?view=markup

It has full runtime assertion based type checking for developers
(--enable-debug=yes) while it has zero user-visible overhead as it is turned
off for the final releases.

It misses the C++-native exceptions / cleanups during the unwinding, though.
Also the developers are usually Gnome unaware and so I found out using such
Gnome standard OO systems does not make the code more friendly to them anyway.
Therefore I do not think it would be worth porting GDB on top of GObject.


Regards,
Jan


  parent reply	other threads:[~2007-07-11 21:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-30 14:56 Michael Eager
2007-07-01 20:54 ` Daniel Jacobowitz
2007-07-02  1:33   ` Joel Brobecker
2007-07-03  3:49     ` Michael Eager
2007-07-03  7:55       ` Mark Kettenis
2007-07-11 21:04     ` Jan Kratochvil [this message]
2007-07-02  7:21   ` Mark Kettenis
2007-07-03  3:57     ` Michael Eager
2007-07-03  7:03       ` Fabian Cenedese
2007-07-03 12:14         ` Robert Dewar
2007-07-03 19:09           ` Gary Funck
2007-07-11 19:47             ` Thiago Jung Bauermann
2007-07-11 19:59               ` Paul Koning
2007-07-11 20:41                 ` Jim Blandy
2007-07-11 21:00                   ` Gary Funck
2007-07-11 21:32                   ` Daniel Jacobowitz
2007-07-11 21:38                     ` Robert Dewar
2007-07-12  3:16                     ` Eli Zaretskii
2007-07-12  2:24               ` Michael Eager
2007-07-13 20:21                 ` Thiago Jung Bauermann
2007-07-13 20:55                   ` Eli Zaretskii
2007-07-13 21:24                     ` Thiago Jung Bauermann
2007-07-12  3:11               ` Eli Zaretskii
2007-07-11 21:11           ` Gary Funck
2007-07-02 20:21   ` David Daney
2007-07-02 20:28     ` Daniel Jacobowitz

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=20070711210402.GA26350@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb@sourceware.org \
    /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