This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 3/9] add target method 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: Mon, 28 Oct 2013 11:53:40 -0600
- Subject: Re: [PATCH v4 3/9] add target method delegation
- Authentication-results: sourceware.org; auth=none
- References: <1382464769-2465-1-git-send-email-tromey at redhat dot com> <1382464769-2465-4-git-send-email-tromey at redhat dot com> <526E8B54 dot 8040104 at redhat dot com> <87eh75cmig dot fsf at fleche dot redhat dot com>
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> It seems to me that the best approach is to make a target_delegate_*
Tom> function assert only when there is no de_fault for the corresponding
Tom> method.
I mean, when there *is* a de_fault.
The idea is that if there is a de_fault, then the slot cannot be NULL.
So, delegation must never fail.
On the other hand, if there is no de_fault, then the slot can be NULL,
and what exactly to do depends on the method in question.
But looking more closely at the code on the branch, there is an
assertion in those methods returning something other than void.
I'll think about it some more.
Tom