public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/27889] New: jit.c:1178: internal-error: void jit_event_handler(gdbarch*, objfile*): Assertion `jiter->jiter_data != nullptr' failed.
@ 2021-05-20 10:03 vries at gcc dot gnu.org
  2021-05-20 10:08 ` [Bug gdb/27889] " vries at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: vries at gcc dot gnu.org @ 2021-05-20 10:03 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=27889

            Bug ID: 27889
           Summary: jit.c:1178: internal-error: void
                    jit_event_handler(gdbarch*, objfile*): Assertion
                    `jiter->jiter_data != 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=x86_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 != nullptr'
failed.
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-06-23 13:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 10:03 [Bug gdb/27889] New: jit.c:1178: internal-error: void jit_event_handler(gdbarch*, objfile*): Assertion `jiter->jiter_data != nullptr' failed vries at gcc dot gnu.org
2021-05-20 10:08 ` [Bug gdb/27889] " vries at gcc dot gnu.org
2021-05-20 10:40 ` vries at gcc dot gnu.org
2021-05-20 11:34 ` pafee at tycoint dot com
2021-05-20 12:10 ` vries at gcc dot gnu.org
2021-05-20 13:23 ` [Bug breakpoints/27889] " vries at gcc dot gnu.org
2021-05-20 13:32 ` vries at gcc dot gnu.org
2021-05-20 13:36 ` vries at gcc dot gnu.org
2021-05-20 15:30 ` vries at gcc dot gnu.org
2021-05-21 13:09 ` cvs-commit at gcc dot gnu.org
2021-05-21 13:19 ` vries at gcc dot gnu.org
2022-06-22 19:08 ` hector.oron at gmail dot com
2022-06-22 19:10 ` hector.oron at gmail dot com
2022-06-22 19:13 ` guillaume at morinfr dot org
2022-06-23 12:20 ` vries at gcc dot gnu.org
2022-06-23 13:36 ` guillaume at morinfr dot org

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).