From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8E8B33950C9C; Thu, 20 May 2021 10:03:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E8B33950C9C From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/27889] New: jit.c:1178: internal-error: void jit_event_handler(gdbarch*, objfile*): Assertion `jiter->jiter_data != nullptr' failed. Date: Thu, 20 May 2021 10:03:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Thu, 20 May 2021 10:03:34 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27889 Bug ID: 27889 Summary: jit.c:1178: internal-error: void jit_event_handler(gdbarch*, objfile*): Assertion `jiter->jiter_data !=3D nullptr' failed. Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- Take example from https://llvm.org/docs/DebuggingJITedCode.html, save as test.c. [ Probably works with any example, just listing what I used. ] Verify compilation and error code: ... $ gcc test.c; ./a.out; echo $?; rm a.out 255 ... Compile into llvm byte code: ... $ clang -g -S -emit-llvm --target=3Dx86_64-unknown-unknown-elf test.c ... Verify that byte-code works: ... $ lli test.ll; echo $? 255 ... Now run under gdb: ... $ gdb -q -batch -ex run --args /usr/bin/lli test.ll [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [Inferior 1 (process 23272) exited with code 0377] ... Ok, that went fine. Using -ex "set debug infrun 1" we can also verify that handle_jit_event was called: ... [infrun] handle_jit_event: handling bp_jit_event ... Now install debuginfo for libllvm: ... $ sudo zypper in libLLVM10-debuginfo ... and try again: ... $ gdb -q -batch -ex run --args /usr/bin/lli test.ll Dwarf Error: Cannot not find DIE at 0x18a936e7 [from module /usr/lib/debug/usr/lib64/libLLVM.so.10-10.0.1-lp152.30.4.x86_64.debug] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". /home/vries/gdb_versions/devel/src/gdb/jit.c:1178: internal-error: void jit_event_handler(gdbarch*, objfile*): Assertion `jiter->jiter_data !=3D nu= llptr' failed. ... --=20 You are receiving this mail because: You are on the CC list for the bug.=