From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7162 invoked by alias); 12 Apr 2016 09:04:05 -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 7024 invoked by uid 89); 12 Apr 2016 09:04:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:637, decrease X-HELO: mail-pf0-f181.google.com Received: from mail-pf0-f181.google.com (HELO mail-pf0-f181.google.com) (209.85.192.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 12 Apr 2016 09:04:00 +0000 Received: by mail-pf0-f181.google.com with SMTP id 184so10318246pff.0 for ; Tue, 12 Apr 2016 02:04:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=Fs5nsA4vcpqzCZbeL3BpB21ps2bKE6UyKdO1FF58G9c=; b=Hn3Bxr6T3ZFIEKoY52XT7eyH/C4JzfPNEwo68mHjq8qduQDRKJBahoeMUW1GRqzMCW ILG/Y8BghbWJgvXI8lBjOpLsD/SY6XuKkegpXE0Xy/5bE4WT1iRaUuROjk3qRGMca4Kj jlN4EcpCM+0K2YwqQj0ygRs7bwt4itZ3m1LtCKVo7+Q9R+c25oXh7jSZ2Flz1f2/kbqu 5sxm+TjXnbyAqvwBYwhWbqhBpVPt3m4i8dOjjYF3CtfdUEGGYaUOm+jXCQzUVYLPKdly w29nXmxEVVAb8Lks2/Vo9xk1tF+kw2x3+YDbsX9vmmLZ2ONXInQUhPUM3hbLZBWnjyCB 0U6w== X-Gm-Message-State: AOPr4FUVDyh/mwj08yFnjLIm9kT3vbtK9blmiYotcsywlYA/1wuvIEkw4tq0raG1xTh/qw== X-Received: by 10.98.87.200 with SMTP id i69mr2999929pfj.63.1460451839134; Tue, 12 Apr 2016 02:03:59 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id uw2sm41866309pac.10.2016.04.12.02.03.56 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 12 Apr 2016 02:03:58 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH 4/7] Insert breakpoint even when the raw breakpoint is found References: <1458749384-19793-1-git-send-email-yao.qi@linaro.org> <1458749384-19793-5-git-send-email-yao.qi@linaro.org> <570BB7AF.1080703@redhat.com> Date: Tue, 12 Apr 2016 09:04:00 -0000 In-Reply-To: <570BB7AF.1080703@redhat.com> (Pedro Alves's message of "Mon, 11 Apr 2016 15:41:51 +0100") Message-ID: <86y48jjj0v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00239.txt.bz2 Pedro Alves writes: > Can we only increase the refcount if inserting succeeds? gdbserver can > use gdb exceptions nowadays, and even though lots of current gdbserver > code isn't exception safe, it'd be nice to start considering that. One thing I can think of is to properly decrease refcount if exception is thrown. Anything else? I don't think we need to worry about the atomicity of increment and decrement of refcount, because I don't figure out a case the refcount is updated together in mainline code and in exception. --=20 Yao (=E9=BD=90=E5=B0=A7)