This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit/Ada] General ada-valprint improvements
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 09 Jan 2014 09:14:42 -0700
- Subject: Re: [commit/Ada] General ada-valprint improvements
- Authentication-results: sourceware.org; auth=none
- References: <1389068515-10129-1-git-send-email-brobecker at adacore dot com> <87r48jhfa8 dot fsf at fleche dot redhat dot com> <20140108113517 dot GL3802 at adacore dot com> <87txdecwgc dot fsf at fleche dot redhat dot com> <20140109030557 dot GS3802 at adacore dot com>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> I was afraid of that. For Ada, I have some hopes that I could
Joel> re-implement val_print on top of value_print if I split ada_value_print.
Joel> If that works out, and if we find we can transition all languages
Joel> that way, perhaps that'll simplify the transition.
Yeah, that might be a workable approach.
Joel> While talking crazy-large cleanup projects, I have been having this idea
Joel> in the back of my mind that I'd like the value printing to be done
Joel> by a language-independent engine, with the language only providing
Joel> decorations and hints.
[...]
Joel> So, if we could extract out the varobj engine, and then make varobj
Joel> one formatter, and CLI-valprint another formatter, it seems like
Joel> most of the valprint units such as ada-valprint could go away.
That is an interesting idea.
FWIW I did do a tiny bit of work in this direction, see struct
generic_val_print_decorations. This let us unify a reasonable amount
of code here. At the time I looked at a lot of the type-code cases in
the various language value printers, but I don't remember any more
why I didn't push this idea further.
Tom