This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unifying the GCC Debugging Interface
Hi,
On Mon, 19 Nov 2012, Martin Jambor wrote:
> Well, this is what I was actually afraid of. If things like generic
> or tree dump of a tree value is selected by new TDF_ flags, then you
> are in danger of just replacing current mess in function names by a
> mess of constants. I'd much rather have functions dump_generic,
> dump_tree (and dump_function!), with consistent parameters, for the
> three very different dumps than TDF_gimple, TDF_tree and TDF_function
> constants which would do some sort of second level function
> overloading. I understand my approach would not be a real grand
> unification, but I believe that either way we'll have to remember a
> few identifiers to make dumping useful.
And <tab>-completion is faster with different function names than when the
larger layout (in contrast to some little details) is determined by a
flag. Look:
(gdb) dump_s<tab>tuff (t, TDF_f<tab>unction)
vs
(gdb) dump_f<tab>unction (t)
So, yes, the larger layouting should be determined by name of the dump
function. A flag argument might look nice from an interface design
perspective, but it's harder to use in the debugger.
Ciao,
Michael.