From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24286 invoked by alias); 11 Apr 2013 22:59:27 -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 24196 invoked by uid 89); 11 Apr 2013 22:59:27 -0000 X-Spam-SWARE-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 11 Apr 2013 22:59:27 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3BMxQmE000924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Apr 2013 18:59:26 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3BMxOKD028567 for ; Thu, 11 Apr 2013 18:59:25 -0400 Subject: [PATCH 04/26] alpha-tdep.c/mips-tdep.c: "set heuristic-fence-post" is signed/zinteger. To: gdb-patches@sourceware.org From: Pedro Alves Date: Thu, 11 Apr 2013 23:01:00 -0000 Message-ID: <20130411225923.16791.83488.stgit@brno.lan> In-Reply-To: <20130411225847.16791.29283.stgit@brno.lan> References: <20130411225847.16791.29283.stgit@brno.lan> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00344.txt.bz2 These commands are currently var_zinteger, hence their control variable is signed. gdb/ 2013-04-11 Pedro Alves * alpha-tdep.c (heuristic_fence_post): Change type to int. (alpha_heuristic_proc_start): Adjust to check -1 instead of UINT_MAX. * mips-tdep.c (heuristic_fence_post): Change type to int. (heuristic_proc_start): Adjust to check -1 instead of UINT_MAX. --- gdb/alpha-tdep.c | 4 ++-- gdb/mips-tdep.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index e394605..7696b42 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1032,7 +1032,7 @@ static const struct frame_unwind alpha_sigtramp_frame_unwind = { /* Heuristic_proc_start may hunt through the text section for a long time across a 2400 baud serial line. Allows the user to limit this search. */ -static unsigned int heuristic_fence_post = 0; +static int heuristic_fence_post = 0; /* Attempt to locate the start of the function containing PC. We assume that the previous function ends with an about_to_return insn. Not foolproof by @@ -1059,7 +1059,7 @@ alpha_heuristic_proc_start (struct gdbarch *gdbarch, CORE_ADDR pc) if (func) return func; - if (heuristic_fence_post == UINT_MAX + if (heuristic_fence_post == -1 || fence < tdep->vm_min_address) fence = tdep->vm_min_address; diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 9d9451c..8e5d5d2 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -787,7 +787,7 @@ static const signed char mips_reg3_to_reg[8] = { 16, 17, 2, 3, 4, 5, 6, 7 }; time across a 2400 baud serial line. Allows the user to limit this search. */ -static unsigned int heuristic_fence_post = 0; +static int heuristic_fence_post = 0; /* Number of bytes of storage in the actual machine representation for register N. NOTE: This defines the pseudo register type so need to @@ -4021,7 +4021,7 @@ heuristic_proc_start (struct gdbarch *gdbarch, CORE_ADDR pc) if (start_pc == 0) return 0; - if (heuristic_fence_post == UINT_MAX || fence < VM_MIN_ADDRESS) + if (heuristic_fence_post == -1 || fence < VM_MIN_ADDRESS) fence = VM_MIN_ADDRESS; instlen = mips_pc_is_mips (pc) ? MIPS_INSN32_SIZE : MIPS_INSN16_SIZE;