Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: GDB to C++ issue: deletion
@ 2008-07-31 23:34 Paul Hilfinger
  0 siblings, 0 replies; 16+ messages in thread
From: Paul Hilfinger @ 2008-07-31 23:34 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb


> > 1. Ahem, which is precisely why I used a new subject, so as not to 
> >    incorporate an incidental side discussion into the same thread!
> 
> Sorry.  You replied to the same thread; most current Unix mailers
> will thread such replies together regardless of subject.  I didn't
> even notice.

How "helpful" of them.  Sorry; I didn't edit my header stringently
enough.  My bad.

> > 2. On the other hand, if someone is going to claim the advantages of 
> >    not having to do delete as an advantage, it is not entirely 
> >    unreasonable to make sure it really works out that way in practice.
> 
> IMO that applies to short lived variables, not the sort of things that
> get obstacked at all.

Actually, I had already concluded that short-lived variables would NOT
be a great problem.  To a first approximation, the effect of using STL's
storage management is to increase allocation costs by some constant
factor, because deallocation cost for an object tends to be limited by
some constant times its allocation cost.  As long as GDB's allocation
costs are not huge (and the constant factors are not huge), we
shouldn't have much pain.  

But that's just an overall argument about total execution time.
Common sources of short-lived variables (say during parsing and
(sub)expression evaluation) don't produce that many variables between
prompts (usually).  What I was more interested in was the possibility
of noticeably large changes in pause times for expensive operations
(such as re-reading a symbol table) on large executables.  I can think
of approaches, certainly, but have no actual experience with how well
they integrate with STL classes in practice.

Paul



^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Move GDB to C++ ?
@ 2008-07-31 14:37 Alpár Jüttner
  2008-07-31 22:30 ` GDB to C++ issue: deletion Paul Hilfinger
  0 siblings, 1 reply; 16+ messages in thread
From: Alpár Jüttner @ 2008-07-31 14:37 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb

> 2. Not everybody knows C++, so if I'm hit by a bus, not everybody will be able to
> adopt this module. (This is obviously more important for core parts than for MI).
> I'm not sure if this aspect is critical -- I get the impression that even those
> who object to C++ actually knows the language.

Sometimes I feel the opposite. Most of the concerns appearing in this
list are a kind of phobia against C++. Some of them was true in the past
but not now, others are just a result of ignorance.

A good example for that was the debate on xfree vs. delete. One of the
goals of STL standard containers is that using them the programmer will
almost never has to use 'delete'.

There _are_ serious problems with C++, but if C++ is used properly, they
will not be a problem in case of gdb. Also, C++ could have been designed
much much better, but even this bad design provides major benefits over
C for skilled developers.

Best regards,
Alpar


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-08-01 15:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-31 23:34 GDB to C++ issue: deletion Paul Hilfinger
  -- strict thread matches above, loose matches on Subject: below --
2008-07-31 14:37 Move GDB to C++ ? Alpár Jüttner
2008-07-31 22:30 ` GDB to C++ issue: deletion Paul Hilfinger
2008-07-31 22:40   ` Daniel Jacobowitz
2008-07-31 22:58     ` Paul Hilfinger
2008-07-31 23:25       ` Daniel Jacobowitz
2008-08-01  5:38   ` Ian Lance Taylor
2008-08-01  8:52   ` André Pönitz
2008-08-01  9:53     ` Eli Zaretskii
2008-08-01 12:57       ` Daniel Jacobowitz
2008-08-01 14:57         ` Paul Koning
2008-08-01 15:31           ` Eli Zaretskii
2008-08-01 13:51       ` André Pönitz
     [not found]       ` <20080801125124.GA13594@caradoc.them.org>
     [not found]         ` <uzlnwn9jq.fsf@gnu.org>
2008-08-01 13:59           ` Daniel Jacobowitz
2008-08-01 15:17             ` Eli Zaretskii
2008-08-01 15:29               ` Daniel Jacobowitz
2008-08-01 15:38                 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox