From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118039 invoked by alias); 19 Oct 2015 16:21:36 -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 117987 invoked by uid 89); 19 Oct 2015 16:21:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 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; Mon, 19 Oct 2015 16:21:35 +0000 Received: by pabrc13 with SMTP id rc13so195294130pab.0 for ; Mon, 19 Oct 2015 09:21:33 -0700 (PDT) X-Received: by 10.66.161.234 with SMTP id xv10mr35079430pab.131.1445271693287; Mon, 19 Oct 2015 09:21:33 -0700 (PDT) Received: from E107787-LIN (gcc2-power8.osuosl.org. [140.211.9.43]) by smtp.gmail.com with ESMTPSA id ir5sm25596366pbc.13.2015.10.19.09.21.30 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 19 Oct 2015 09:21:32 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 14/18] Implement TARGET_WAITKIND_NO_RESUMED in the remote protocol References: <1444836486-25679-1-git-send-email-palves@redhat.com> <1444836486-25679-15-git-send-email-palves@redhat.com> Date: Mon, 19 Oct 2015 16:21:00 -0000 In-Reply-To: <1444836486-25679-15-git-send-email-palves@redhat.com> (Pedro Alves's message of "Wed, 14 Oct 2015 16:28:02 +0100") Message-ID: <868u6y3k3d.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-10/txt/msg00344.txt.bz2 Pedro Alves writes: > Testing with "maint set target-non-stop on" causes regressions in > tests that rely on TARGET_WAITKIND_NO_RESUMED, which isn't modelled on > the RSP. In real all-stop, gdbserver detects the situation and > reporst error to GDB, and so the tests (e.g., > gdb.threads/no-unwaited-for-left.exp) at fail quickly. But with > "maint set target-non-stop on", GDB instead hangs forever waiting for > a stop reply that never comes, and so the tests take longer to time > out. A quick comment here, we also need to get rid of setup_kfail "gdb/14618" "*-*-*" in gdb.threads/no-unwaited-for-left.exp, otherwise, we'll see=20 KPASS: gdb.threads/no-unwaited-for-left.exp: continue stops when thread 2 e= xits (PRMS gdb/14618) KPASS: gdb.threads/no-unwaited-for-left.exp: continue stops when the main t= hread exits (PRMS gdb/14618) gdb.threads/no-unwaited-for-left.exp also triggers a SIGSEGV in AArch64 GDBserver, because current_thread is de-referenced, but it is NULL. Program received signal SIGSEGV, Segmentation fault. inferior_regcache_data (inferior=3Dinferior@entry=3D0x0) at /home/yao/Sourc= eCode/gnu/gdb/git/gdb/gdbserver/inferiors.c:259 259 /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/inferiors.c: No such fil= e or directory. (gdb) bt=20=20 #0 inferior_regcache_data (inferior=3Dinferior@entry=3D0x0) at /home/yao/S= ourceCode/gnu/gdb/git/gdb/gdbserver/inferiors.c:259 #1 0x0000000000406138 in get_thread_regcache (thread=3D0x0, fetch=3Dfetch@= entry=3D0) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/regcache.c:31 #2 0x00000000004204b8 in is_64bit_tdesc () at /home/yao/SourceCode/gnu/gdb= /git/gdb/gdbserver/linux-aarch64-low.c:84 #3 0x000000000042128c in aarch64_supports_z_point_type (z_type=3D) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-aarch64-low= .c:263 #4 0x0000000000424c70 in linux_supports_z_point_type (z_type=3D) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/linux-low.c:5634 #5 0x0000000000410fbc in z_type_supported (z_type=3D48 '0') at /home/yao/S= ourceCode/gnu/gdb/git/gdb/gdbserver/mem-break.c:918 #6 check_gdb_bp_preconditions (z_type=3Dz_type@entry=3D48 '0', err=3D0x40e= 3c8 , err@entry=3D0x7ffffff1dc) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/mem-break.c:1009 #7 0x0000000000412250 in delete_gdb_breakpoint (z_type=3Dz_type@entry=3D48= '0', addr=3D4196920, size=3D0) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/mem-break.c:1081 #8 0x000000000040e3c8 in process_serial_event () at /home/yao/SourceCode/g= nu/gdb/git/gdb/gdbserver/server.c:4182 #9 0x000000000040f754 in handle_serial_event (err=3D, clien= t_data=3D) at /home/yao/SourceCode/gnu/gdb/git/gdb/gdbserver/server.c:4312 Need to figure out what is the best fix. --=20 Yao (=E9=BD=90=E5=B0=A7)