From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19168 invoked by alias); 28 Dec 2013 03:41:28 -0000 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 Received: (qmail 19157 invoked by uid 89); 28 Dec 2013 03:41:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 28 Dec 2013 03:41:27 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 32884116586; Fri, 27 Dec 2013 22:41:25 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id CyyK8jaoLpXS; Fri, 27 Dec 2013 22:41:25 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BCD60116579; Fri, 27 Dec 2013 22:41:24 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id BB24CE0833; Sat, 28 Dec 2013 07:41:21 +0400 (RET) Date: Sat, 28 Dec 2013 03:41:00 -0000 From: Joel Brobecker To: Sergio Durigan Junior Cc: GDB Patches , Marcus Shawcroft , Yufeng Zhang Subject: Re: [PATCH] Extend handling of immediates on ARM's SystemTap SDT probe support Message-ID: <20131228034121.GF4532@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-12/txt/msg00976.txt.bz2 > Continuing my series of fixes on the SystemTap SDT support for the > ARM/AArch64 architectures, this patch now extends how ARM's SDT specific > parser handles literal numbers (immediates). > > Currently, it only accepts "#" as the prefix. However, according to > "info '(as) ARM-Chars'", expressions can also have "$" and nothing as a > prefix. This patch extends the parser to accept those options. > > It is a rather trivial patch, and tests have proved that it works fine. > OK to apply? > > -- > Sergio > > 2013-12-23 Sergio Durigan Junior > > * arm-linux-tdep.c (arm_stap_is_single_operand): Accept "$" as a > literal prefix. Also accept no prefix at all. > (arm_stap_parse_special_token): Likewise. > (arm_linux_init_abi): Likewise. The patch itself looks fine, except for one (correct) bit which caught my attention. See below. > > diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c > index 0284f69..df2b8c4 100644 > --- a/gdb/arm-linux-tdep.c > +++ b/gdb/arm-linux-tdep.c > @@ -1116,7 +1116,7 @@ arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch, > static int > arm_stap_is_single_operand (struct gdbarch *gdbarch, const char *s) > { > - return (*s == '#' /* Literal number. */ > + return (*s == '#' || *s == '$' || isdigit (*s) /* Literal number. */ > || *s == '[' /* Register indirection or > displacement. */ > || isalpha (*s)); /* Register value. */ > @@ -1183,14 +1183,19 @@ arm_stap_parse_special_token (struct gdbarch *gdbarch, > > ++tmp; > tmp = skip_spaces_const (tmp); > - if (*tmp++ != '#') > - return 0; > + if (*tmp == '#' || *tmp == '$') > + ++tmp; > > if (*tmp == '-') > { > ++tmp; > got_minus = 1; > } > + else if (*tmp == '+') > + ++tmp; > + > + if (!isdigit (*tmp)) > + return 0; > I think you mixed in one change which is unrelated to this patch (the handling of the '+' sign). Perhaps you had meant to have it as part of the first patch? [PATCH v2] Fix for PR tdep/15653: Implement SystemTap SDT probe support for AArch64 http://www.sourceware.org/ml/gdb-patches/2013-12/msg00887.html IIRC, this patch was born by extraction out of v1 of the patch above. If I am correct, this patch is pre-approved with the '+' bit moved to the correct patch. Thank you, -- Joel