From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64758 invoked by alias); 19 Mar 2018 14:35:51 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 64736 invoked by uid 89); 19 Mar 2018 14:35:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: hqemgate16.nvidia.com Received: from hqemgate16.nvidia.com (HELO hqemgate16.nvidia.com) (216.228.121.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Mar 2018 14:35:49 +0000 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Mon, 19 Mar 2018 07:35:43 -0700 Received: from HQMAIL108.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 19 Mar 2018 07:35:44 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 19 Mar 2018 07:35:44 -0700 Received: from UKMAIL102.nvidia.com (10.26.138.15) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 19 Mar 2018 14:35:47 +0000 Received: from localhost.localdomain (10.21.45.12) by UKMAIL102.nvidia.com (10.26.138.15) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 19 Mar 2018 14:35:44 +0000 Subject: 'set debug lin-lwp 1' seems broken with GDB/MI To: References: From: Dmitry Antipov Message-ID: Date: Mon, 19 Mar 2018 14:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL102.nvidia.com (10.26.138.15) X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00032.txt.bz2 On x86_64 GNU/Linux target, 'set debug lin-lwp 1' works as expected in CLI mode... $ ~/.local/gdb-8.1.50/bin/gdb -q (gdb) set debug lin-lwp 1 (gdb) attach 30460 Attaching to process 30460 sigchld LNA: waitpid 30460, saving status Stopped (signal) (stopped) PTRACE_ATTACH LWP 30461, 0, 0 (OK) [New LWP 30461] PTRACE_ATTACH LWP 30462, 0, 0 (OK) sigchld sigchld [New LWP 30462] LNSL: running -> suspending LWP 30462 LNSL: running -> suspending LWP 30461 LNSL: already stopped/no stop_requested yet LWP 30460 linux_nat_wait: [process -1], [TARGET_WNOHANG] RSRL: NOT resuming LWP LWP 30462, not stopped RSRL: NOT resuming LWP LWP 30461, not stopped RSRL: NOT resuming LWP LWP 30460, has pending status LLW: enter LLW: Using pending wait status Stopped (signal) (stopped) for LWP 30460. LLW: exit LNSL: running -> suspending LWP 30461 linux-nat: already stopping LWP 30461 at GDB's request LNSL: running -> suspending LWP 30462 linux-nat: already stopping LWP 30462 at GDB's request linux_nat_wait: [process -1], [] RSRL: NOT resuming LWP LWP 30462, not stopped RSRL: NOT resuming LWP LWP 30461, not stopped RSRL: NOT resuming LWP LWP 30460, not resumed LLW: enter LNW: waitpid(-1, ...) returned 30462, ERRNO-OK LLW: waitpid 30462 received Stopped (signal) (stopped) LLW: resume_stop SIGSTOP caught for LWP 30462. LNW: waitpid(-1, ...) returned 30461, ERRNO-OK LLW: waitpid 30461 received Stopped (signal) (stopped) LLW: resume_stop SIGSTOP caught for LWP 30461. LNW: waitpid(-1, ...) returned 0, ERRNO-OK RSRL: NOT resuming LWP LWP 30462, has pending status RSRL: NOT resuming LWP LWP 30461, has pending status RSRL: NOT resuming LWP LWP 30460, not resumed SEL: Found 2 events, selecting #0 LLW: exit sigchld sigchld sigchld RSRL: NOT resuming LWP LWP 30462, not resumed RSRL: NOT resuming LWP LWP 30461, has pending status RSRL: NOT resuming LWP LWP 30460, not resumed [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". linux_nat_wait: [process -1], [] RSRL: NOT resuming LWP Thread 0x7fba253fa700 (LWP 30462), not resumed RSRL: NOT resuming LWP Thread 0x7fba25bfb700 (LWP 30461), has pending status RSRL: NOT resuming LWP Thread 0x7fba26cb1740 (LWP 30460), not resumed LLW: enter LLW: Using pending wait status Stopped (signal) (stopped) for Thread 0x7fba25bfb700 (LWP 30461). LLW: exit 0x00007fba25fba8ad in pthread_join () from /lib64/libpthread.so.0 ...but not with MI: $ ~/.local/gdb-8.1.50/bin/gdb -q -i=mi2 =thread-group-added,id="i1" =cmd-param-changed,param="auto-load safe-path",value="/" (gdb) -gdb-set debug lin-lwp 1 ^done (gdb) -target-attach 30460 =thread-group-started,id="i1",pid="30460" ~"../../gdb/ui-file.h:59: internal-error: virtual void ui_file::write_async_safe(const char*, long int): write_async_safe\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? (y or n) " Observed on 8.1 release as well. Dmitry