From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16279 invoked by alias); 9 Apr 2010 02:16:38 -0000 Received: (qmail 16268 invoked by uid 22791); 9 Apr 2010 02:16:37 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,TW_QC,TW_RQ,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pw0-f41.google.com (HELO mail-pw0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Apr 2010 02:16:31 +0000 Received: by pwi2 with SMTP id 2so3137806pwi.0 for ; Thu, 08 Apr 2010 19:16:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.101.12 with HTTP; Thu, 8 Apr 2010 19:16:10 -0700 (PDT) In-Reply-To: <1270739689-28732-1-git-send-email-crquan@gmail.com> References: <1270739689-28732-1-git-send-email-crquan@gmail.com> From: Hui Zhu Date: Fri, 09 Apr 2010 02:16:00 -0000 Received: by 10.143.84.5 with SMTP id m5mr603462wfl.313.1270779390224; Thu, 08 Apr 2010 19:16:30 -0700 (PDT) Message-ID: Subject: Re: [PATCH] disassemble support start,+length format To: crquan@gmail.com Cc: gdb-patches@sourceware.org, Joel Brobecker , Eli Zaretskii Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00216.txt.bz2 Cool. I like this patch. I think what we need a changelog like: 2010-04-08 H.J. Lu * 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 N= EWS. Thanks, Hui On Thu, Apr 8, 2010 at 23:14, wrote: > From: CHENG Renquan > > add new support for disassemble by "start,+length" format > > =A0gdb/cli/cli-cmds.c | =A0 16 +++++++++++++--- > =A01 file changed, 13 insertions(+), 3 deletions(-) > > --- gdb/cli/cli-cmds.c.orig =A0 =A0 2010-01-18 14:25:22.000000000 +0800 > +++ gdb/cli/cli-cmds.c =A02010-04-08 23:06:25.816107001 +0800 > @@ -1045,8 +1045,9 @@ disassemble_current_function (int flags) > =A0 =A0 =A0 =A0- dump the assembly code for the function of the current pc > =A0 =A0 =A0disassemble [/mr] addr > =A0 =A0 =A0 =A0- dump the assembly code for the function at ADDR > - =A0 =A0 disassemble [/mr] low high > - =A0 =A0 =A0 - dump the assembly code in the range [LOW,HIGH) > + =A0 =A0 disassemble [/mr] low,high > + =A0 =A0 disassemble [/mr] low,+length > + =A0 =A0 =A0 - dump the assembly code in the range [LOW,HIGH), or [LOW,L= OW+length) > > =A0 =A0A /m modifier will include source code with the assembly. > =A0 =A0A /r modifier will include raw instructions in hex with the assemb= ly. =A0*/ > @@ -1117,8 +1118,16 @@ disassemble_command (char *arg, int from > =A0 else > =A0 =A0 { > =A0 =A0 =A0 /* Two arguments. =A0*/ > + =A0 =A0 =A0int incl_flag =3D 0; > + > =A0 =A0 =A0 low =3D pc; > + =A0 =A0 =A0if (arg[0] =3D=3D '+') { > + =A0 =A0 =A0 ++arg; > + =A0 =A0 =A0 incl_flag =3D 1; > + =A0 =A0 =A0} > =A0 =A0 =A0 high =3D parse_and_eval_address (arg); > + =A0 =A0 =A0if (incl_flag) > + =A0 =A0 =A0 high +=3D low; > =A0 =A0 } > > =A0 print_disassembly (gdbarch, name, low, high, flags); > @@ -1546,7 +1555,8 @@ Default is the function surrounding the > =A0With a /m modifier, source lines are included (if available).\n\ > =A0With a /r modifier, raw instructions in hex are included.\n\ > =A0With a single argument, the function surrounding that address is dumpe= d.\n\ > -Two arguments (separated by a comma) are taken as a range of memory to d= ump.")); > +Two arguments (separated by a comma) are taken as a range of memory to d= ump,\n\ > + =A0in the form of \"start,end\", or \"start,+length\".")); > =A0 set_cmd_completer (c, location_completer); > =A0 if (xdb_commands) > =A0 =A0 add_com_alias ("va", "disassemble", class_xdb, 0); > > -- > git v1.7.0.4, rqcheng at smu edu sg >