From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11851 invoked by alias); 21 Oct 2013 15:37:47 -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 11763 invoked by uid 89); 21 Oct 2013 15:37:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 Oct 2013 15:37:45 +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 r9LFbimD014431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Oct 2013 11:37:44 -0400 Received: from redhat.brq.redhat.com (unused-4-133.brq.redhat.com [10.34.4.133]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9LFbRIu025201; Mon, 21 Oct 2013 11:37:43 -0400 From: Ondrej Oprala To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 12/18] poison "try" Date: Mon, 21 Oct 2013 15:37:00 -0000 Message-Id: <1382369846-5817-13-git-send-email-ooprala@redhat.com> In-Reply-To: <1382369846-5817-1-git-send-email-ooprala@redhat.com> References: <1382369846-5817-1-git-send-email-ooprala@redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00650.txt.bz2 From: Tom Tromey gdb/ChangeLog 2013-10-21 Tom Tromey * hppa-linux-tdep.c (attempt): Renamed from try. * i386-nat.c (attempt): Likewise. * remote-mips.c (attempt): Likewise. --- gdb/hppa-linux-tdep.c | 16 ++++++++-------- gdb/i386-nat.c | 4 ++-- gdb/remote-mips.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c index 52efea1..0720a56 100644 --- a/gdb/hppa-linux-tdep.c +++ b/gdb/hppa-linux-tdep.c @@ -136,7 +136,7 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc) { unsigned int dummy[HPPA_MAX_INSN_PATTERN_LEN]; int offs = 0; - int try; + int attempt; /* offsets to try to find the trampoline */ static int pcoffs[] = { 0, 4*4, 5*4 }; /* offsets to the rt_sigframe structure */ @@ -154,12 +154,12 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc) e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31 08000240 nop */ - for (try = 0; try < ARRAY_SIZE (pcoffs); try++) + for (attempt = 0; attempt < ARRAY_SIZE (pcoffs); attempt++) { - if (insns_match_pattern (gdbarch, sp + pcoffs[try], + if (insns_match_pattern (gdbarch, sp + pcoffs[attempt], hppa_sigtramp, dummy)) { - offs = sfoffs[try]; + offs = sfoffs[attempt]; break; } } @@ -171,8 +171,8 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc) /* sigaltstack case: we have no way of knowing which offset to use in this case; default to new kernel handling. If this is wrong the unwinding will fail. */ - try = 2; - sp = pc - pcoffs[try]; + attempt = 2; + sp = pc - pcoffs[attempt]; } else { @@ -180,13 +180,13 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc) } } - /* sp + sfoffs[try] points to a struct rt_sigframe, which contains + /* sp + sfoffs[attempt] points to a struct rt_sigframe, which contains a struct siginfo and a struct ucontext. struct ucontext contains a struct sigcontext. Return an offset to this sigcontext here. Too bad we cannot include system specific headers :-(. sizeof(struct siginfo) == 128 offsetof(struct ucontext, uc_mcontext) == 24. */ - return sp + sfoffs[try] + 128 + 24; + return sp + sfoffs[attempt] + 128 + 24; } struct hppa_linux_sigtramp_unwind_cache diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c index 0a5deb0..6069350 100644 --- a/gdb/i386-nat.c +++ b/gdb/i386-nat.c @@ -524,8 +524,8 @@ i386_handle_nonaligned_watchpoint (struct i386_debug_reg_state *state, int align = addr % max_wp_len; /* Four (eight on AMD64) is the maximum length a debug register can watch. */ - int try = (len > max_wp_len ? (max_wp_len - 1) : len - 1); - int size = size_try_array[try][align]; + int attempt = (len > max_wp_len ? (max_wp_len - 1) : len - 1); + int size = size_try_array[attempt][align]; if (what == WP_COUNT) { diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index bf6cce5..423e8b1 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -857,7 +857,7 @@ mips_send_packet (const char *s, int get_ack) /* unsigned */ int len; unsigned char *packet; int cksum; - int try; + int attempt; len = strlen (s); if (len > DATA_MAXLEN) @@ -884,7 +884,7 @@ mips_send_packet (const char *s, int get_ack) /* We can only have one outstanding data packet, so we just wait for the acknowledgement here. Keep retransmitting the packet until we get one, or until we've tried too many times. */ - for (try = 0; try < mips_send_retries; try++) + for (attempt = 0; attempt < mips_send_retries; attempt++) { int garbage; int ch; -- 1.8.3.1