public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/31254] [gdb, arm] FAIL: gdb.threads/staticthreads.exp: up 10
Date: Fri, 19 Jan 2024 10:32:31 +0000	[thread overview]
Message-ID: <bug-31254-4717-XQoqt6zqz2@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31254-4717@http.sourceware.org/bugzilla/>

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

--- Comment #12 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Thiago Jung Bauermann from comment #10)
> Created attachment 15309 [details]
> Testcase executable from run where it failed.
> 
> Here's the executable.
> 

Thanks.

[ One first observation is that on my platform, the static exec contains debug
info for both staticthreads.c and for pthreads.  The attached exec only has
debug info for staticthreads.c.  This causes the difference in detail in the
backtraces between say comment 2 and comment 11. ]

One thing I overlooked was that even with a static exec, there's still an
implicit dependency on libthread_db.  So when I used the attached exec, it
cannot load the local libthread_db because it's incompatible, so I can't print
tlsvar.

Otherwise, things appear to work as expected:
...
$ cat gdb.in
set pagination off
set trace-commands on
file /home/rock/gdb/staticthreads
break -qualified main
run
break 49
continue
thread 1
bt
up 10
$ gdb -q -batch -x gdb.in
+file /home/rock/gdb/staticthreads
+break -qualified main
Breakpoint 1 at 0x104a6: file
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c,
line 58.
+run

Breakpoint 1, main (argc=1, argv=0xfffef6d4) at
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c:58
warning: 58    
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c:
No such file or directory
+break 49
Breakpoint 2 at 0x10476: file
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c,
line 49.
+continue
[New LWP 13085]
[Switching to LWP 13085]

Thread 2 "staticthreads" hit Breakpoint 2, thread_function (arg=0x0) at
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c:49
49      in
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c
+thread 1
[Switching to thread 1 (LWP 13083)]
#0  0x00010ab4 in __libc_do_syscall ()
+bt
#0  0x00010ab4 in __libc_do_syscall ()
#1  0x000405ba in __futex_abstimed_wait_common ()
#2  0x00040688 in __futex_abstimed_wait_cancelable64 ()
#3  0x0001b96e in __pthread_clockjoin_ex ()
#4  0x0001b864 in pthread_join ()
#5  0x00010514 in main (argc=1, argv=0xfffef6d4) at
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c:76
+up 10
#5  0x00010514 in main (argc=1, argv=0xfffef6d4) at
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c:76
76      in
/home/thiago.bauermann/src/binutils-gdb/gdb/testsuite/gdb.threads/staticthreads.c
...

I tried running this in a loop, always works fine.  So, unfortunately I can't
reproduce the problem.

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

  parent reply	other threads:[~2024-01-19 10:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 16:07 [Bug gdb/31254] New: " vries at gcc dot gnu.org
2024-01-17 16:08 ` [Bug gdb/31254] " vries at gcc dot gnu.org
2024-01-17 16:08 ` vries at gcc dot gnu.org
2024-01-17 16:12 ` vries at gcc dot gnu.org
2024-01-17 16:14 ` vries at gcc dot gnu.org
2024-01-17 16:19 ` vries at gcc dot gnu.org
2024-01-17 16:23 ` thiago.bauermann at linaro dot org
2024-01-17 16:37 ` luis.machado at arm dot com
2024-01-17 16:37 ` thiago.bauermann at linaro dot org
2024-01-17 16:44 ` thiago.bauermann at linaro dot org
2024-01-18 17:12 ` adhemerval.zanella at linaro dot org
2024-01-18 17:42 ` vries at gcc dot gnu.org
2024-01-18 19:15 ` thiago.bauermann at linaro dot org
2024-01-18 19:54 ` thiago.bauermann at linaro dot org
2024-01-19 10:32 ` vries at gcc dot gnu.org [this message]
2024-01-19 10:38 ` vries at gcc dot gnu.org
2024-01-24  2:51 ` thiago.bauermann at linaro dot org
2024-01-24  2:55 ` thiago.bauermann at linaro dot org
2024-01-31  4:03 ` thiago.bauermann at linaro dot org
2024-02-01  3:24 ` thiago.bauermann at linaro dot org
2024-02-01 10:04 ` vries at gcc dot gnu.org
2024-02-01 10:10 ` luis.machado at arm dot com
2024-02-01 18:32 ` thiago.bauermann at linaro dot org
2024-02-01 20:28 ` tdevries at suse dot de
2024-02-02  1:39 ` thiago.bauermann at linaro dot org
2024-02-03  3:26 ` thiago.bauermann at linaro dot org
2024-02-05  5:56 ` vries at gcc dot gnu.org
2024-02-05 10:04 ` cvs-commit at gcc dot gnu.org
2024-02-05 10:05 ` [Bug tdep/31254] [gdb/tdep, " vries at gcc dot gnu.org
2024-02-06 21:32 ` cvs-commit at gcc dot gnu.org
2024-02-06 21:33 ` cvs-commit at gcc dot gnu.org
2024-02-07  8:00 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31254-4717-XQoqt6zqz2@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).