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

Versions after v1.15.6 disable access to vm.Program.Location #546

Closed
buixor opened this issue Feb 2, 2024 · 1 comment
Closed

Versions after v1.15.6 disable access to vm.Program.Location #546

buixor opened this issue Feb 2, 2024 · 1 comment

Comments

@buixor
Copy link

buixor commented Feb 2, 2024

ref: #544

with v1.15.6, some fields of vm.Program aren't accessible/public anymore, such as Locations.

I used to rely on the Locations field to fetch the source code line number associated with a given instruction pointer. By using vm.Step(), vm.Position() and the Locations of vm.Program, it allows to display debug/code to users when debugging their expression in crowdsec.

Making this field public again would allow to continue to provide such a feature!

@antonmedv
Copy link
Member

Added program.Locations()

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