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

parboiled-java: assert that debug information (-g:vars) is present #106

Open
nornagon opened this issue Jan 20, 2017 · 1 comment
Open

Comments

@nornagon
Copy link

Perhaps I'm missing something obvious, but Var framing doesn't seem to be working properly. I made a small repro: https://gist.github.com/nornagon/73f6d756f22fc685028bec855eecfd27

The symptom appears to be that Var frames don't get pushed/popped.

To repro:

$ git clone https://gist.github.com/73f6d756f22fc685028bec855eecfd27.git parboiled-repro
$ cd parboiled-repro
$ make

Instead of seeing the value 1 for the Var every time, we see the values 1, 2, 3 and 4. Instead of seeing the level of the Var change when recursing, we see it's always 0.

@nornagon
Copy link
Author

nornagon commented Jan 20, 2017

I discovered what the issue is here: without debugging info (javac -g), ASM is unable to discover local variable information. Adding -g to the javac command in the Makefile in my above-linked gist fixes the behavior.

Perhaps an assertion could be added to detect whether debugging symbols are present?

@nornagon nornagon changed the title Issue with Var framing parboiled-java: assert that debug information (-g:vars) is present Jan 22, 2017
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

1 participant