From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CFDBC3857033; Tue, 20 Oct 2020 02:51:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFDBC3857033 From: "erickitten at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/25560] Assertion `pid != 0' failed Date: Tue, 20 Oct 2020 02:51:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: erickitten at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2020 02:51:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25560 Che-Kang Wu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |erickitten at gmail dot com --- Comment #9 from Che-Kang Wu --- I found the same assertion fail on Windows 10 (Mingw32) to ARM cross-gdb wh= en remote debugging. Bug 24825 also shows a similar issue, not sure if this is the same. 1) Example program #include int main (void) { printf("Hello world!\n"); return 1; } 2) Compile arm-linux-gnueabihf-gcc -g 1.c 3) Remote ./gdbserver :12000 ./a.out Process ./hello created; pid =3D 1421 Listening on port 12000 4) gdb host arm-linux-gnueabihf-gdb.exe GNU gdb (GDB) 9.2 (gdb) show configuration This GDB was configured as follows: configure --host=3Di686-w64-mingw32 --target=3Darm-linux-gnueabihf --with-auto-load-dir=3D$debugdir:$datadir/auto-load --with-auto-load-safe-path=3D$debugdir:$datadir/auto-load --with-expat --with-gdb-datadir=3D/usr/local/share/gdb (relocatable) --with-jit-reader-dir=3D/usr/local/lib/gdb (relocatable) --without-libunwind-ia64 --without-lzma --without-babeltrace --without-intel-pt --without-mpfr --without-xxhash --without-python --without-guile --disable-source-highlight --with-separate-debug-dir=3D/usr/local/lib/debug (relocatable) 5) Set breakpoint (gdb) target remote xxx.xxx.xxx.xxx:12000 (gdb) b main (gdb) c Breakpoint 1, main () at 1.c:6 6 printf("Hello world!\n"); 6) This works normally (gdb) c Continuing. [Inferior 1 (process 1463) exited with code 01] (gdb) q 7) But this fails (gdb) n # Next step to end Single stepping until exit from function __libc_start_main, which has no line number information. [Inferior 1 (process 1457) exited with code 01] You can't do that without a process to debug. (gdb) q /home/eric/project/standalone-build/source/gdb-9.2/gdb-build/../gdb/inferio= r.c:283: internal-error: inferior* find_inferior_pid(int): Assertion `pid !=3D 0' fa= iled. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y --=20 You are receiving this mail because: You are on the CC list for the bug.=