This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 00/32] clean up target delegation
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 15 Jan 2014 09:11:24 -0700
- Subject: Re: [RFC 00/32] clean up target delegation
- Authentication-results: sourceware.org; auth=none
- References: <1389640367-5571-1-git-send-email-tromey at redhat dot com> <52D6852E dot 6080400 at redhat dot com>
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> For a couple, I think the simplest yet would be to change their
Pedro> respective macros/functions to return the field in the topmost target:
[...]
I started implementing the easy bits but then I realized that the debug
target puts a wrinkle into this. For instance, inheriting to_shortname
is needed when target debug is active.
We discussed before that it would be nice to get rid of the debug target.
That's a reasonable amount of typing, though ... there's ~80 target
functions that are just #defines in target.h. It sure would be nice to
automate this as well, but I didn't really see a reasonable way.
It looks like a second round of target cleanups will be needed.
Pedro> Actually, it seems to be that most, if not all, hacks^W uses
Pedro> of target_shortname are wrong, in that they want to know the
Pedro> name of the process_stratum target, not the topmost target.
Wow, I had no idea about this. What hacks!
I filed a bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16454
Tom