Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Anton Kolesov <Anton.Kolesov@synopsys.com>, gdb-patches@sourceware.org
Cc: Francois Bedard <Francois.Bedard@synopsys.com>
Subject: Re: [PATCH 5/5] arc: Add prologue analysis
Date: Fri, 17 Feb 2017 13:25:00 -0000	[thread overview]
Message-ID: <6c70823b-879d-a581-5417-82db9c0ad408@redhat.com> (raw)
In-Reply-To: <20170214100130.29194-5-Anton.Kolesov@synopsys.com>

On 02/14/2017 10:01 AM, Anton Kolesov wrote:
> +
> +/* Copy of fprintf_disasm from disasm.c.  */
> +
> +static int ATTRIBUTE_PRINTF (2, 3)
> +arc_fprintf_disasm (void *stream, const char *format, ...)
> +{
> +  va_list args;
> +
> +  va_start (args, format);
> +  vfprintf_filtered ((struct ui_file *) stream, format, args);
> +  va_end (args);
> +  /* Something non -ve.  */

This is always the null stream AFAICS,
so why waste time with calling vfprintf_filtered?
See disasm.c:gdb_buffered_insn_length_fprintf, for example.

> +  return 0;
> +}
> +
> +/* Return properly initialized disassemble_info.  */
> +
> +struct disassemble_info
> +arc_disassemble_info (struct gdbarch *gdbarch)

Also, something's odd with the patch split, since this function
was used by an earlier patch.

> +# Test more levels of backtrace.
> +gdb_breakpoint nested_prologue_inner temporary
> +gdb_continue_to_breakpoint nested_prologue_inner
> +gdb_test "backtrace 10" \
> +    "#0\[ \t\]*$hex in nested_prologue_inner .*\r\n#1\[ \t\]*$hex in nested_prologue_outer .*\r\n#2\[ \t\]*$hex in main.*" \
> +    "backtrace in nested_prologue_inner"
> +    set regs [saved_regs_to_str {r13 r18}]
> +    gdb_test "info frame" ".*Saved registers:$regs" \
> +	"saved registers in nested_prologue_inner"
> +    set regs [saved_regs_to_str {r14 r15 blink}]
> +    gdb_test "info frame 1" ".*Saved registers:$regs" \
> +	"saved registers in nested_prologue_outer"
> +

Something's odd with indentation here.

This is missing a NEWS entry for the command.

But otherwise, this looks very good to me.

Thanks,
Pedro Alves


  parent reply	other threads:[~2017-02-17 13:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 10:01 [PATCH 1/5] arc: Align internal regnums with architectural regnums Anton Kolesov
2017-02-14 10:01 ` [PATCH 3/5] arc: Add "maintenance print arc" command prefix Anton Kolesov
2017-02-17 13:02   ` Pedro Alves
2017-02-14 10:01 ` [PATCH 2/5] arc: Set section to ".text" when disassembling Anton Kolesov
2017-02-15 22:27   ` Yao Qi
2017-02-16 16:35     ` Anton Kolesov
2017-02-17 12:31       ` Pedro Alves
2017-03-15 15:16         ` Anton Kolesov
2017-02-14 10:01 ` [PATCH 4/5] arc: Add disassembler helper Anton Kolesov
2017-02-14 15:50   ` Eli Zaretskii
2017-02-17 13:00   ` Pedro Alves
2017-02-17 13:01   ` Pedro Alves
2017-02-14 10:01 ` [PATCH 5/5] arc: Add prologue analysis Anton Kolesov
2017-02-14 15:51   ` Eli Zaretskii
2017-02-17 13:25   ` Pedro Alves [this message]
2017-03-15 15:18     ` [PATCH 5/5 v2] " Anton Kolesov
2017-03-15 15:59       ` Eli Zaretskii
2017-03-27 14:20       ` Anton Kolesov
2017-03-28 13:28         ` Pedro Alves
2017-02-17 13:26 ` [PATCH 1/5] arc: Align internal regnums with architectural regnums Pedro Alves

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=6c70823b-879d-a581-5417-82db9c0ad408@redhat.com \
    --to=palves@redhat.com \
    --cc=Anton.Kolesov@synopsys.com \
    --cc=Francois.Bedard@synopsys.com \
    --cc=gdb-patches@sourceware.org \
    /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