public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Jan Kratochvil <jkratochvil@azul.com>
Cc: gdb-patches@sourceware.org, Alan Hayward <alan.hayward@arm.com>
Subject: Re: [PING] [PATCH] gdb/arm: Fix backtrace for pthread_cond_timedwait
Date: Wed, 18 Jan 2023 14:22:51 +0000	[thread overview]
Message-ID: <90ba687c-952f-9fa8-b6d4-90d9735621a8@arm.com> (raw)
In-Reply-To: <Y8fdJh6ZdJZxdDFf@host1.jankratochvil.net>

Hi Jan,

On 1/18/23 11:51, Jan Kratochvil wrote:
> Hi Luis,
> 
> On Tue, 17 Jan 2023 19:14:01 +0800, Luis Machado wrote:
>> I see the same results with a patched and unpatched gdb:
>>
>> PASS: gdb.arch/arm-pthread_cond_timedwait-bt.exp: successfully compiled posix threads test case
>> PASS: gdb.arch/arm-pthread_cond_timedwait-bt.exp: advance to break-line
>> PASS: gdb.arch/arm-pthread_cond_timedwait-bt.exp: thread 2 for svc check
>> UNTESTED: gdb.arch/arm-pthread_cond_timedwait-bt.exp: pc points to svc
>>
>> Do you see something different?
> 
> Yes, on Raspbian 11 (bullseye), Linux version 5.15.32-v7l+, Raspberry 4.
> 
> What OS do you run?

I'm on Ubuntu 22.04/20.04, but running 32-bit on a 64-bit system via Docker. There seems to be a divergence in the
expected pattern of the svc instruction.

I see the following:

x/i $pc
=> 0xf7eadb04 <__libc_do_syscall+4>:    svc     0

The test seems to be expecting a pattern of

x/i $pc
=> 0xf7eadb04 <__libc_do_syscall+4>:    svc     0x00000000

If I replaced the pattern to force a match, the test continues until the unwinder check. Then it runs into a
UNTESTED again because I see the dwarf2 unwinder being used.

That may be because I have debug info installed I suppose. I wonder if there is a way to force gdb not to use the
dwarf2 unwinder for libc, even if it is available on the system.

> 
> There is the unfortunate dependency on system pthread_cond_timedwait()
> implementation. The testcase could provide also its own .S implementation but
> then it could be incompatible with the rest of system glibc.
> 
> 
> Jan


  reply	other threads:[~2023-01-18 14:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-31  8:48 Jan Kratochvil
2023-01-16 16:10 ` [PING] " Jan Kratochvil
2023-01-17 11:14   ` Luis Machado
2023-01-18 11:51     ` Jan Kratochvil
2023-01-18 14:22       ` Luis Machado [this message]
2022-12-31  8:48         ` [PATCH v2] " Jan Kratochvil
2023-01-19  3:15         ` [PING] [PATCH] " Jan Kratochvil
2023-01-20 17:41           ` Luis Machado
2022-12-31  8:48             ` [PATCH v3] " Jan Kratochvil
2023-02-24 13:38             ` [PING] [PATCH] " Jan Kratochvil
2023-02-24 16:56               ` Luis Machado
2022-12-31  8:48                 ` [PATCH v4] " Jan Kratochvil
2023-02-25 10:04                 ` [PING] [PATCH] " Jan Kratochvil
2023-03-20 12:51                   ` [PING^2] " Jan Kratochvil
2023-03-30 14:30                     ` Luis Machado
2023-03-30 16:09                       ` Luis Machado
2023-04-01 13:49                         ` [committed] " Jan Kratochvil

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=90ba687c-952f-9fa8-b6d4-90d9735621a8@arm.com \
    --to=luis.machado@arm.com \
    --cc=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jkratochvil@azul.com \
    /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).