Re: sim_engine_halt() broken in binutils 2.34
Andrew Burgess <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
* William Tambe <[email protected]> [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