Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [RFC] auto-generate most target debug methods
Date: Fri, 20 Jun 2014 08:00:00 -0000	[thread overview]
Message-ID: <53A3E9A8.4080305@codesourcery.com> (raw)
In-Reply-To: <1403208237-27023-1-git-send-email-tromey@redhat.com>

On 06/20/2014 04:03 AM, Tom Tromey wrote:
> +static void
> +target_debug_print_unsigned_char_p (unsigned char *sigs)
> +{
> +  fputs_unfiltered ("{", gdb_stdlog);
> +  if (sigs != NULL)
> +    {
> +      int i;
> +
> +      for (i = 0; i < GDB_SIGNAL_LAST; i++)
> +	if (sigs[i])
> +	  fprintf_unfiltered (gdb_stdlog, " %s", gdb_signal_to_name (i));
> +    }
> +  fputs_unfiltered (" }", gdb_stdlog);
> +}

This function should be renamed to target_debug_print_signal, for
example, and typedef unsigned char * signal, if I understand your
script correctly.

> +/* Printers for the debug target.  Each prints an object of a given
> +   type to a string that needn't be freed.  In a few cases, a new
> +   typedef is introduced just to override the normal printing approach
> +   for the underlying type; see target.h for those.  Most printers are
> +   macros, for brevity, but a few are static functions where more
> +   complicated behavior is needed.
> +
> +   References to these printers are automatically generated by
> +   make-target-delegates.  See the generated file target-delegates.c.
> +
> +   A few methods are still handled explicitly in target.c:
> +   target_fetch_registers target_store_registers target_xfer_partial

This isn't valid to me.  I do see debug_fetch_registers,
debug_store_registers and debug_xfer_partial are generated.

> +   target_fileio_* target_close target_info_proc
> +
> +   In most cases this is because target delegation hasn't been done for
> +   the method.  */

Otherwise, this patch looks good.

-- 
Yao (齐尧)


  reply	other threads:[~2014-06-20  8:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 20:04 Tom Tromey
2014-06-20  8:00 ` Yao Qi [this message]
2014-06-20 14:04   ` Tom Tromey
2014-07-15 11:17 ` Pedro Alves
2014-07-15 15:20   ` Tom Tromey
2014-07-16 15:46   ` Tom Tromey
2014-07-17 14:50     ` Pedro Alves
2014-07-17 16:12       ` Tom Tromey
2014-07-17 16:35         ` Pedro Alves
2014-07-17 16:41           ` Tom Tromey
2014-07-17 16:52             ` Pedro Alves
2014-07-17 16:49       ` Tom Tromey
2014-07-17 16:51         ` Pedro Alves
2014-07-24 13:59         ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A3E9A8.4080305@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox