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

How to view variable content in IR? #25

Open
adriaanjacobs opened this issue Jan 7, 2025 · 3 comments
Open

How to view variable content in IR? #25

adriaanjacobs opened this issue Jan 7, 2025 · 3 comments

Comments

@adriaanjacobs
Copy link
Contributor

Hi!

Thanks for the useful utility, I've been using it for a while now.
Is it possible that I can't seem to be able to dump variable contents, though?

For unnamed variables, I get it. But even for named variables, GDB always responds with

No symbol "variable_name" in current context.

Any idea what's going wrong there?

@vaivaswatha
Copy link
Owner

Using the hello.ll example in test-files/ directory, if I use debugir ./hello.ll -instnamer to get hello.dbg.ll, and then run gdb as gdb --args lli -jit-kind=mcjit hello.dbg.ll, and set a breakpoint at hello.ll:16 and then run it, I can print %i in hello.ll as print i, and it just works.

@adriaanjacobs
Copy link
Contributor Author

Ah I see, using lli, thanks! Should have read the README better :)

Is there any reason why, under native debugging (without lli), this is not possible?

@vaivaswatha
Copy link
Owner

it should work theoretically, especially if line-by-line execution works (which you say it does, but i haven't tried). I don't know though. I'll try it sometime and check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants