Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: crquan@gmail.com
Cc: gdb-patches@sourceware.org,
	Joel Brobecker <brobecker@adacore.com>,
	 	Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH] disassemble support start,+length format
Date: Fri, 09 Apr 2010 02:16:00 -0000	[thread overview]
Message-ID: <u2gdaef60381004081916x6907816ez9b6474b66cdb271a@mail.gmail.com> (raw)
In-Reply-To: <1270739689-28732-1-git-send-email-crquan@gmail.com>

Cool.  I like this patch.

I think what we need a changelog like:
2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>

	* i387-tdep.c (i387_collect_xsave): Replace abort with
	internal_error.

And we need update this change to doc in doc/gdb.texinfo and new entry in NEWS.

Thanks,
Hui

On Thu, Apr 8, 2010 at 23:14,  <crquan@gmail.com> wrote:
> From: CHENG Renquan <rqcheng@smu.edu.sg>
>
> add new support for disassemble by "start,+length" format
>
>  gdb/cli/cli-cmds.c |   16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
>
> --- gdb/cli/cli-cmds.c.orig     2010-01-18 14:25:22.000000000 +0800
> +++ gdb/cli/cli-cmds.c  2010-04-08 23:06:25.816107001 +0800
> @@ -1045,8 +1045,9 @@ disassemble_current_function (int flags)
>        - dump the assembly code for the function of the current pc
>      disassemble [/mr] addr
>        - dump the assembly code for the function at ADDR
> -     disassemble [/mr] low high
> -       - dump the assembly code in the range [LOW,HIGH)
> +     disassemble [/mr] low,high
> +     disassemble [/mr] low,+length
> +       - dump the assembly code in the range [LOW,HIGH), or [LOW,LOW+length)
>
>    A /m modifier will include source code with the assembly.
>    A /r modifier will include raw instructions in hex with the assembly.  */
> @@ -1117,8 +1118,16 @@ disassemble_command (char *arg, int from
>   else
>     {
>       /* Two arguments.  */
> +      int incl_flag = 0;
> +
>       low = pc;
> +      if (arg[0] == '+') {
> +       ++arg;
> +       incl_flag = 1;
> +      }
>       high = parse_and_eval_address (arg);
> +      if (incl_flag)
> +       high += low;
>     }
>
>   print_disassembly (gdbarch, name, low, high, flags);
> @@ -1546,7 +1555,8 @@ Default is the function surrounding the
>  With a /m modifier, source lines are included (if available).\n\
>  With a /r modifier, raw instructions in hex are included.\n\
>  With a single argument, the function surrounding that address is dumped.\n\
> -Two arguments (separated by a comma) are taken as a range of memory to dump."));
> +Two arguments (separated by a comma) are taken as a range of memory to dump,\n\
> +  in the form of \"start,end\", or \"start,+length\"."));
>   set_cmd_completer (c, location_completer);
>   if (xdb_commands)
>     add_com_alias ("va", "disassemble", class_xdb, 0);
>
> --
> git v1.7.0.4, rqcheng at smu edu sg
>


  reply	other threads:[~2010-04-09  2:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 15:09 crquan
2010-04-09  2:16 ` Hui Zhu [this message]
2010-04-15  7:44 ` crquan
2010-04-15 17:08   ` Eli Zaretskii
2010-04-15 17:14     ` Nathan Froyd
2010-04-15 17:38       ` Eli Zaretskii
2010-04-16  1:36 ` crquan
2010-04-20 15:43   ` Tom Tromey
2010-04-20 18:43 ` crquan
2010-04-30 14:21   ` Hui Zhu
2010-07-09  2:53   ` crquan
2010-07-09  8:23     ` Eli Zaretskii
2010-07-09 11:32     ` crquan
2010-07-11 11:53       ` Hui Zhu
2010-07-11 17:28         ` Cheng Renquan
2010-07-27 16:04       ` Joel Brobecker
2010-04-09  4:11 crquan
2010-04-09  8:22 ` Eli Zaretskii
2010-04-09  9:35   ` Cheng Renquan
2010-04-09 10:29     ` Eli Zaretskii
2010-04-09 18:14 ` Tom Tromey
2010-04-10 21:01 crquan
2010-04-10 21:16 ` Eli Zaretskii
2010-04-10 21:23 ` Cheng Renquan
2010-04-13 23:29 ` 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=u2gdaef60381004081916x6907816ez9b6474b66cdb271a@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=crquan@gmail.com \
    --cc=eliz@gnu.org \
    --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