This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] auto-generate most target debug methods
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Fri, 20 Jun 2014 08:04:07 -0600
- Subject: Re: [RFC] auto-generate most target debug methods
- Authentication-results: sourceware.org; auth=none
- References: <1403208237-27023-1-git-send-email-tromey at redhat dot com> <53A3E9A8 dot 4080305 at codesourcery dot com>
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> This function should be renamed to target_debug_print_signal, for
Yao> example, and typedef unsigned char * signal, if I understand your
Yao> script correctly.
Yeah, that would be cleaner. I'll fix it up.
>> + A few methods are still handled explicitly in target.c:
>> + target_fetch_registers target_store_registers target_xfer_partial
Yao> This isn't valid to me. I do see debug_fetch_registers,
Yao> debug_store_registers and debug_xfer_partial are generated.
The comment is a bit off.
target_store_registers still has some targetdebug code to call
debug_print_register, which can't really be handled using the type-based
method.
to_xfer_partial has a debug method generated but due to the way
target_xfer_partial is written, the debug method is never actually
called. Note that a similar issue exists in the current code with
debug_to_open -- I think it can't ever be called because the target's
to_open is passed directly to add_cmd.
Tom