From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11730 invoked by alias); 24 Nov 2011 09:21:14 -0000 Received: (qmail 11722 invoked by uid 22791); 24 Nov 2011 09:21:11 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-gx0-f169.google.com (HELO mail-gx0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Nov 2011 09:20:58 +0000 Received: by ggnq1 with SMTP id q1so2869540ggn.0 for ; Thu, 24 Nov 2011 01:20:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.46.72 with SMTP id q48mr2009584yhb.80.1322126458112; Thu, 24 Nov 2011 01:20:58 -0800 (PST) Received: by 10.146.137.4 with HTTP; Thu, 24 Nov 2011 01:20:58 -0800 (PST) In-Reply-To: References: Date: Thu, 24 Nov 2011 09:21:00 -0000 Message-ID: Subject: Re: [PATCH v2, alpha]: Handle single-stepping of atomic sequences From: Uros Bizjak To: gdb-patches@sourceware.org Cc: Alan Modra , Richard Henderson , Ulrich Weigand Content-Type: text/plain; charset=ISO-8859-1 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: 2011-11/txt/msg00677.txt.bz2 On Fri, Nov 18, 2011 at 1:18 PM, Uros Bizjak wrote: > >> The gcc simulate-thread.exp testsuite exposed the problem in handling >> of alpha atomic sequences. Single-stepping broke link in alpha's LL/SC >> atomic sequences. >> >> Attached patch copies handling of atomic sequences from rs6000-tdep.c >> and adapts the functionality for alpha. >> >> I don't have write access, so If OK, please someone commit this patch >> to gdb CVS. > > [v2]: Since this patch is almost a copy of rs6000-tdep.c atomic > sequence handling, also take into account proposed changes [1] to > original rs6000 implementation. > > [1] http://sourceware.org/ml/gdb-patches/2011-11/msg00468.html 2011-11-24 Uros Bizjak * alpha-tdep.c (br_opcode): New. (ldl_l_opcode, ldq_l_opcode, stl_c_opcode, stq_c_opcode): Ditto. (alpha_deal_with_atomic_sequence): New function. (alpha_gdbarch_init): Handle single stepping of atomic sequences with alpha_deal_with_atomic_sequence. [v3]: As suggested by Ulrich, handle all branch instructions inside compare and exchange loop. Re-tested on alphaev68-pc-linux-gnu, also with simulate-thread.exp from GCC testsuite. Uros.