From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C0E23857352; Thu, 16 Feb 2023 15:38:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C0E23857352 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676561933; bh=QjAaLhc2o8wNoD/OwDyL6dNC5DnLxAZYHFW0GJRDEpU=; h=From:To:Subject:Date:From; b=emWVwdFi7ClGP6HWI+HpLOkp1PnXbAE3sYxnt1QVHjM+Q3ySCwhT5K0MU08Vn39kQ 4MgMu9QEE5ElBCWZEQAwyXkCxgTb7E3TSNs+dA1umhCXDM6yyOJzMnz3Z2oRvaG5sn l2NAF17t1vOZK7Ewqxji/oDkg4lnRXgvZ3xeQuHY= From: "aburgess at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug remote/30129] New: Thread exited messages are missing for remote targets Date: Thu, 16 Feb 2023 15:38:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: remote X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aburgess at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30129 Bug ID: 30129 Summary: Thread exited messages are missing for remote targets Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: remote Assignee: unassigned at sourceware dot org Reporter: aburgess at redhat dot com Target Milestone: --- The remote target fails to print "[Thread ... exited]" messages in the CLI output. This can be seen as test failures in the test script gdb.threads/thread-specific-bp.exp. Here's the test binary being run on native: $ ./gdb/gdb -q -ex 'set sysroot /' --data-directory ./gdb/data-directory/ ./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp Reading symbols from ./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp... (gdb) b start Breakpoint 1 at 0x40113e: file /tmp/binutils-gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.thread= s/thread-specific-bp.c, line 23. (gdb) r Starting program: /tmp/binutils-gdb/build/gdb/testsuite/outputs/gdb.threads/thread-specific-b= p/thread-specific-bp=20 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff7c5d700 (LWP 1234259)] [Switching to Thread 0x7ffff7c5d700 (LWP 1234259)] Thread 2 "thread-specific" hit Breakpoint 1, start (arg=3D0x0) at /tmp/binutils-gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.thread= s/thread-specific-bp.c:23 23 return NULL; (gdb) c Continuing. [Thread 0x7ffff7c5d700 (LWP 1234259) exited] [Inferior 1 (process 1234256) exited normally] (gdb)=20 And here's the same session but using a remote target: $ ./gdb/gdb -q -ex 'set sysroot /' --data-directory ./gdb/data-directory/ ./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp Reading symbols from ./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp... (gdb) target extended-remote | gdbserver --once - ./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp Remote debugging using | gdbserver --once - ./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp stdin/stdout redirected Process ./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp created; pid =3D 1234988 Remote debugging using stdio Reading symbols from /lib64/ld-linux-x86-64.so.2... (No debugging symbols found in /lib64/ld-linux-x86-64.so.2) 0x00007ffff7fd3110 in _start () from /lib64/ld-linux-x86-64.so.2 (gdb) b start Breakpoint 1 at 0x40113e: file /tmp/binutils-gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.thread= s/thread-specific-bp.c, line 23. (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /tmp/binutils-gdb/build/gdb/testsuite/outputs/gdb.threads/thread-specific-b= p/thread-specific-bp=20 stdin/stdout redirected Process ./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp created; pid =3D 1235004 warning: while parsing target library list (at line 1): Required attribute "lmid" of not specified [New Thread 1235004.1235005] [Switching to Thread 1235004.1235005] Thread 2 "thread-specific" hit Breakpoint 1, start (arg=3D0x0) at /tmp/binutils-gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.thread= s/thread-specific-bp.c:23 23 return NULL; (gdb) c Continuing. [Inferior 1 (process 1235004) exited normally] (gdb)=20 Notice the '[Thread ... exited]' message is missing for the remote session. I posted a small patch to fix this issue here: https://sourceware.org/pipermail/gdb-patches/2022-November/194204.html However, this was rejected in favour of a bigger refactoring, which is unfortunately #30 in a 31 patch series: https://sourceware.org/pipermail/gdb-patches/2022-December/194694.html Until that's merged I need a bug-id that I can use in XFAIL messages for new tests that I'm adding. --=20 You are receiving this mail because: You are on the CC list for the bug.=