From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50735 invoked by alias); 25 Nov 2015 17:16:33 -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 50712 invoked by uid 89); 25 Nov 2015 17:16:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f50.google.com Received: from mail-pa0-f50.google.com (HELO mail-pa0-f50.google.com) (209.85.220.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 25 Nov 2015 17:16:31 +0000 Received: by pacej9 with SMTP id ej9so62948667pac.2 for ; Wed, 25 Nov 2015 09:16:29 -0800 (PST) X-Received: by 10.98.71.92 with SMTP id u89mr32191318pfa.143.1448471789758; Wed, 25 Nov 2015 09:16:29 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id 79sm22025844pfb.67.2015.11.25.09.16.27 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 25 Nov 2015 09:16:29 -0800 (PST) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: exceptions.KeyboardInterrupt is thrown in gdb.base/random-signal.exp References: <86ziy2xdt7.fsf@gmail.com> <5655E141.7030503@redhat.com> Date: Wed, 25 Nov 2015 17:16:00 -0000 In-Reply-To: <5655E141.7030503@redhat.com> (Pedro Alves's message of "Wed, 25 Nov 2015 16:26:41 +0000") Message-ID: <86h9kaxamv.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: 2015-11/txt/msg00526.txt.bz2 Pedro Alves writes: > Seems like a hack -- I don't see how that can make a difference. In both > cases, we send \003 after 500ms. The only difference is that {send_gdb "\003"} will be executed in an event handler later while tcl has already been in gdb_test. > > The test sets a software watchpoint, and resumes the target. That means > the program will be constantly single-stepping, and gdb will be evaluating > the watched expression at each single-step. I'd suspect that the problem > is likely that while the program is stopped to evaluate the watched > expression, something is calling target_terminal_ours, which restores > handle_sigint as SIGINT handler. Then somehow you're unlucky to manage to > ctrl-c at that exact time. The fix in that case is likely to be to call > target_terminal_ours_for_output instead, which doesn't touch the SIGINT > handler. That was one of my clues... I set breakpoint on target_terminal_ours, but it isn't hit. Anyway, I'll look into it further. --=20 Yao (=E9=BD=90=E5=B0=A7)