On 5/17/12, Tom Tromey <tro...@redhat.com> wrote:
> > "Lawrence" == Lawrence Crowl <cr...@google.com> writes:
>
> Tom> Doesn't this mean that if you have checking enabled, and you use
> Tom> the wrong macro on some tree, cc1 will crash?  That seems like
> Tom> a distinct minus to me.
>
> Lawrence> Yes, it does mean that, but it is a net overall improvement.
>
> It is a net debugging improvement compared to trunk, but not
> compared to using 'macro define's.

If you know about them and your debuggers supports them.  It was
two years before I learned about those macros.  By moving the
source closer to standard code, we reduce the frustration for
new developers.  I was particularly frustrated by this problem.

> It would be nice if there were a way to make cc1 not crash due
> to user error in the debugger.  I think this kind of crash will
> be especially crazy-making.

Agreed.  Intercept abort in gdb?

> Lawrence> These extensions are not on gdb's list of things to
> Lawrence> implement.
>
> As a digression - I guess they could be.

That would certainly help in several when using gdb.  It would not
help if someone needs or wants to use a different debugger.

> Reusing the compiler for this seems like the only way to go.
> But, we did look at using g++ to parse C++ expressions from gdb,
> and it was too slow :-(.  We're going to look again, at least to
> generate some bug reports if we can.

It's a tough problem, particularly as C/C++ and their compilers
were not designed for a read-eval-print-loop environment.

-- 
Lawrence Crowl

Reply via email to