From: Andrew Burgess <andrew.burgess@embecosm.com>
To: William Tambe <tambewilliam@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: sim_engine_halt() broken in binutils 2.34
Date: Sun, 02 Feb 2020 21:47:00 -0000 [thread overview]
Message-ID: <20200202214715.GA20838@embecosm.com> (raw)
In-Reply-To: <CAF8i9mMu9jCvoFtoLR9Xk8C1jpSHyvtDN+rL4C=uNQuR67ZDnQ@mail.gmail.com>
* William Tambe <tambewilliam@gmail.com> [2020-02-02 00:03:40 -0500]:
> I am running GDB with target sim.
>
> Calling sim_engine_halt() triggers the following error:
> ../../binutils-gdb/gdb/inferior.c:286: internal-error: inferior*
> find_inferior_pid(process_stratum_target*, int): Assertion `pid != 0'
> failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n)
>
> Any idea idea what changed ?
I suspect that this is a similar issue (but not the exact same fix) as
something I already posted here:
https://sourceware.org/ml/gdb-patches/2020-01/msg00980.html
You could double check if you like, I believe if you check out the
commit just before 5b6d1e4fa4fc682 then you'll find your issue goes
away.
The problem is caused, I suspect, by a use of `inferior_ptid' at a
place where this used to not be the null_ptid, but now is null_ptid.
I had a little nose around for places related to the simulator where
this bug might be hiding, but couldn't see anything obvious.
If you could let us know which simulator you're using, and what you do
to trigger the call to sim_engine_halt then we might be able to
reproduce the issue.
You could also try to collect a backtrace from GDB at the point the
assertion triggers, I believe GDB offers to dump core on an assertion,
so you can use that to obtain the backtrace. We might get lucky, and
something in the backtrace could be the offender.
Best of luck!
Andrew
next prev parent reply other threads:[~2020-02-02 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-02 5:03 William Tambe
2020-02-02 21:47 ` Andrew Burgess [this message]
2020-02-03 2:12 ` William Tambe
2020-02-03 10:05 ` Andrew Burgess
2020-02-04 2:59 ` William Tambe
2020-02-04 10:32 ` Andrew Burgess
2020-02-04 10:41 ` William Tambe
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=20200202214715.GA20838@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb@sourceware.org \
--cc=tambewilliam@gmail.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