From: Simon Marchi <simark@simark.ca>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
gdb-patches@sourceware.org
Subject: Re: [RFA] When getting the locno of a bpstat, handle the case of bp with null locations.
Date: Sun, 20 Nov 2022 14:34:31 -0500 [thread overview]
Message-ID: <5464181b-9de6-c242-cdac-58efbf262437@simark.ca> (raw)
In-Reply-To: <20221120173024.3647464-1-philippe.waroquiers@skynet.be>
On 11/20/22 12:30, Philippe Waroquiers via Gdb-patches wrote:
> The test py-objfile.exp unloads the current file while debugging the process.
> This results in bpstat bs->b->loc to become nullptr.
> Handle this case in breakpoint.c:bpstat_locno.
>
> Note: GDB crashes on this problem with an internal error,
> but the end of gdb summary shows:
> ...
> === gdb Summary ===
>
> # of expected passes 36
>
> The output also does not contain a 'FAIL:'.
> After the dix, the nr of expeted passes increased.
>
> In the gdb.log output, one can see:
> ...
> Fatal signal: Segmentation fault
> ----- Backtrace -----
> 0x55698905c5b9 gdb_internal_backtrace_1
> ../../binutils-gdb/gdb/bt-utils.c:122
> 0x55698905c5b9 _Z22gdb_internal_backtracev
> ...
>
> ERROR: Couldn't send python print(objfile.filename) to GDB.
> ERROR: : spawn id exp9 not open
> while executing
> "expect {
> -i exp9 -timeout 10
> -re ".*A problem internal to GDB has been detected" {
> fail "$message (GDB internal error)"
> gdb_internal_error..."
> ("uplevel" body line 1)
> invoked from within
> ....
>
> Wondering if it might be possible to improve gdb_test to have
> gdb_test "python print(objfile.filename)" "None" \
> "objfile.filename after objfile is unloaded"
> reporting a failed result instead of just producing the internal error.
I ran the testsuite with the patch applied, I saw these unexpected
failures when running with native-gdbserver or
native-extended-gdbserver:
FAIL: gdb.base/step-over-syscall.exp: detach-on-fork=off: follow-fork=parent: break cond on target : fork: continue to marker
FAIL: gdb.base/step-over-syscall.exp: detach-on-fork=off: follow-fork=child: break cond on target : fork: continue to marker
I bisected, and it pointed to the locno patch again. Probably the
expected patterns that need to be updated?
continue^M
Continuing.^M
[New inferior 2 (process 1262224)]^M
^M
Thread 1.1 "step-over-fork" hit Breakpoint 4.1, marker () at /home/simark/src/binutils-gdb/gdb/testsuite/gdb.base/step-over-fork.c:22^M
22 marker () {}^M
(gdb) FAIL: gdb.base/step-over-syscall.exp: detach-on-fork=off: follow-fork=parent: break cond on target : fork: continue to marker
However, I confirm it gets rid of the UNRESOLVEDs due to the ASan
complaints. But I don't have time to look at the code right now, sorry.
Simon
next prev parent reply other threads:[~2022-11-20 19:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-20 17:30 Philippe Waroquiers
2022-11-20 19:34 ` Simon Marchi [this message]
2022-11-20 23:46 ` Philippe Waroquiers
2022-11-21 15:04 ` Simon Marchi
2022-11-21 21:07 ` Philippe Waroquiers
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=5464181b-9de6-c242-cdac-58efbf262437@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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).