public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/30129] New: Thread exited messages are missing for remote targets
@ 2023-02-16 15:38 aburgess at redhat dot com
  2023-03-09 11:31 ` [Bug remote/30129] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: aburgess at redhat dot com @ 2023-02-16 15:38 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30129

            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.threads/thread-specific-bp.c,
line 23.
  (gdb) r
  Starting program:
/tmp/binutils-gdb/build/gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp 
  [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=0x0) at
/tmp/binutils-gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
  23      return NULL;
  (gdb) c
  Continuing.
  [Thread 0x7ffff7c5d700 (LWP 1234259) exited]
  [Inferior 1 (process 1234256) exited normally]
  (gdb) 

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 = 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.threads/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-bp/thread-specific-bp 
  stdin/stdout redirected
  Process
./gdb/testsuite/outputs/gdb.threads/thread-specific-bp/thread-specific-bp
created; pid = 1235004
  warning: while parsing target library list (at line 1): Required attribute
"lmid" of <library> not specified
  [New Thread 1235004.1235005]
  [Switching to Thread 1235004.1235005]

  Thread 2 "thread-specific" hit Breakpoint 1, start (arg=0x0) at
/tmp/binutils-gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
  23      return NULL;
  (gdb) c
  Continuing.
  [Inferior 1 (process 1235004) exited normally]
  (gdb) 

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-23  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16 15:38 [Bug remote/30129] New: Thread exited messages are missing for remote targets aburgess at redhat dot com
2023-03-09 11:31 ` [Bug remote/30129] " cvs-commit at gcc dot gnu.org
2023-08-23  9:12 ` cvs-commit at gcc dot gnu.org
2023-08-23  9:14 ` aburgess at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).