On 5/18/12, Diego Novillo <dnovi...@google.com> wrote:
> So, I would like to figure out what to do with this.  We have
> a usability problem wrt deubgging that I would like to fix.
> The only way we have of using all the tree accessor macros from
> GDB is to convert the checks into functions (converting the actual
> accessor macros would also work, but that's a different story).
>
> Now that we have the ability to skip functions in gdb, making tree
> checking into functions should not be a problem.  Additionally, we
> can make gdb skip other common functions (like tree_code_length).
>
> We can do this in trunk today using a variant of Lawrence's original
> patch (http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01649.html).  This
> uses no C++ features, though it weakens type checking by removing away
> constness.

The difference between then and now is that we now have the gdb
skip command, which fixes the problem of introducing another step
point into debugging code using the macros.

> In the cxx-conversion branch, we can use overloads, which will
> DTRT with const.
>
> My question is, what do folks prefer?
>
> a) The trunk patch today, using no C++ features.
> b) Wait for the cxx-conversion variant?
>
> Incidentally, making these expression statements into out-of-line
> functions saves about 3% in the final binary size, but increases
> compile time by about 10% (tested on several large .o files in
> bld/gcc), so we likely want to keep them as inline functions.

With the inline functions, if the compiler is doing no inlining,
we should still get near to that 3% reduction in binary size.

-- 
Lawrence Crowl

Reply via email to