Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: teawater <teawater@gmail.com>
To: Tom Tromey <tromey@redhat.com>, Eli Zaretskii <eliz@gnu.org>,
	Doug Evans <dje@google.com>
Cc: Pedro Alves <pedro@codesourcery.com>,
	Daniel Jacobowitz <drow@false.org>,
	 	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFC] disassemble-next-line
Date: Wed, 11 Mar 2009 08:32:00 -0000	[thread overview]
Message-ID: <daef60380903102016n3c8476b3w3e890df80c699ef@mail.gmail.com> (raw)
In-Reply-To: <m3vdqi67lg.fsf@fleche.redhat.com>

Hi guys,

On Mon, Mar 9, 2009 at 23:26, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "teawater" == teawater  <teawater@gmail.com> writes:
>
> teawater> This is the patch for the function to output assembly codes
> teawater> for next line.
>
> teawater> +/* If ON, GDB will output the assembly codes of next line.
> teawater> +   If OFF, GDB will not do it.
> teawater> +   doesn't support it, GDB will instead use the traditional
>
> I think this third line should be removed.

OK. I will remove it.

>
> teawater> +/* Show assembly codes; stub for catch_errors.  */
> teawater> +
> teawater> +struct gdb_disassembly_stub_args
> teawater> +{
> teawater> +  int how_many;
> teawater> +  CORE_ADDR low;
> teawater> +  CORE_ADDR high;
> teawater> +};
> teawater> +
> teawater> +static int
> teawater> +gdb_disassembly_stub (void *args)
> teawater> +{
> teawater> +  struct gdb_disassembly_stub_args *p = args;
> teawater> +  gdb_disassembly (uiout, 0, 0, 0, p->how_many, p->low, p->high);
> teawater> +  return 0;
>
> IMO, in this case it would be shorter, and clearer, to use TRY_CATCH
> at the call site rather than catch_errors.  What do you think?

OK.  I will change it to TRY_CATCH.

>
> teawater> +  /* If disassemble-next-line is set to auto or on and doesn't have
> teawater> +     line message, output current instructions.  */
>
> "a line message"
>
> teawater> +      /* If disassemble-next-line is set to on and there is line
> teawater> +         messages, output assembly codes for next line.  */
>
> "there are line messages"

I will change it.

>
> teawater> +  add_setshow_enum_cmd ("disassemble-next-line", class_run,
> teawater> +                     disassemble_next_line_enum,
> teawater> +                     &disassemble_next_line, _("\
> teawater> +Set debugger's willingness to use disassemble-next-line."), _("\
>
> This text seems circular.
> Instead it should briefly describe what the option does.
>
> teawater> +Show debugger's willingness to use disassemble-next-line."), _("\
> teawater> +If on, gdb will output the assembly codes of next line.\n\
>
> This also reads strangely, but I don't have a suggestion for what it
> ought to say.  I think it should at least say when the assembly will
> be displayed.  "assembly codes" in particular sounds odd to me.

I think Doug's idea is better:
If ON, GDB will disassemble the next source line when execution stops.
If the next source line cannot be ascertained, the next instruction
will be disassembled instead.

>
> teawater> +If auto (which is the default), gdb will output a assembly code\n\
> teawater> +at current address if there is not line message."),
>
> "at the current address"

I will change it.

>
> The line message bit could use rewording as well; at least s/not/no/.
>

About line message.
struct symtab_and_line
{
  struct symtab *symtab;
  struct obj_section *section;
  /* Line number.  Line numbers start at 1 and proceed through symtab->nlines.
     0 is never a valid line number; it is used to indicate that line number
     information is not available.  */
  int line;

  CORE_ADDR pc;
  CORE_ADDR end;
  int explicit_pc;
  int explicit_line;
};
It don't have comment name.
What about change it to "line debug message"?


Thanks for your help.
Hui


  parent reply	other threads:[~2009-03-11  3:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-08  5:34 teawater
2009-03-09 15:29 ` Tom Tromey
2009-03-09 19:41   ` Eli Zaretskii
2009-03-10  2:45     ` Doug Evans
2009-03-11  8:32   ` teawater [this message]
2009-03-12 23:57     ` teawater
2009-03-13  0:50       ` Pedro Alves
2009-03-13  5:54         ` teawater
2009-03-13  9:53       ` Eli Zaretskii
2009-03-16  7:59         ` teawater
2009-03-16 19:22           ` Eli Zaretskii
2009-03-16 19:40             ` Doug Evans
2009-03-16 19:54               ` Eli Zaretskii
2009-03-17  3:15                 ` teawater
2009-03-17  4:52                   ` Eli Zaretskii
2009-03-17  5:30                     ` teawater
2009-03-17  6:21                       ` teawater
2009-03-17 19:03                         ` Eli Zaretskii
2009-03-17 23:26                           ` teawater

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=daef60380903102016n3c8476b3w3e890df80c699ef@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=dje@google.com \
    --cc=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    --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