Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging support for JIT code #1501

Closed
llvmbot opened this issue Jan 22, 2007 · 6 comments
Closed

Debugging support for JIT code #1501

llvmbot opened this issue Jan 22, 2007 · 6 comments
Labels
bugzilla Issues migrated from bugzilla mcjit

Comments

@llvmbot
Copy link
Member

llvmbot commented Jan 22, 2007

Bugzilla Link 1129
Resolution FIXED
Resolved on Oct 13, 2009 16:46
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @asl,@nunoplopes

Extended Description

When debugging JIT code, I'd like to have some means to either step through code
using GDB or see a trace of JITed code.

@llvmbot
Copy link
Member Author

llvmbot commented Jan 22, 2007

As I mentioned to Leonard on IRC, one way to do the trace feature is to:

  1. Add a -jit-trace-debug option.
  2. Have IntrinsicLowering lower intrinsics into function calls if that option
    is set.
  3. Implement those functions in lli to print out the trace of the program.

It might also be possible to specify a breakpoint from the debugger by calling a
special lli function with the file name and line number. Then the trace would
stop printing out until the break point was hit.

@lattner
Copy link
Collaborator

lattner commented Jan 22, 2007

It would be far better to make the JIT emit DWARF information to memory, then inform GDB about it. I
have no idea if GDB has such a feature. Do you know how tcc works?

@asl
Copy link
Collaborator

asl commented Mar 7, 2007

tcc uses stabs. I don't know how to inform gdb to load something from memory.
Leonard, do you have some example code with tcc & jit'ed debugging?

@nunoplopes
Copy link
Member

I believe this is done by now. There's now support for both gdb and oprofile.

@lhames
Copy link
Contributor

lhames commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#21523

@lhames
Copy link
Contributor

lhames commented Nov 27, 2021

mentioned in issue llvm/llvm-bugzilla-archive#45208

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
kitano-metro pushed a commit to RIKEN-RCCS/llvm-project that referenced this issue Feb 14, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla mcjit
Projects
None yet
Development

No branches or pull requests

5 participants