Skip to content

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

@buixor

Description

@buixor

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions