Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

KaitaiStream must have ability to report position relative to root IO object #26

Copy link
Copy link
@Mingun

Description

@Mingun
Issue body actions

That absolute positions must be stored in the debug maps (_attrStart, _attrEnd, _arrStart, _arrEnd). Without that it is impossible or too hard to determine correct position of parsed objects, especially of instances objects.

For example, consider following KSY:

meta:
  id: offsets
seq:
  - id: padding
    type: u1
  - id: unsized
    type: type
  - id: sized
    type: type
    size: 10
types:
  type:
    seq:
      - id: padding
        type: u1
      - id: unsized_simple
        type: u1
      - id: sized_simple
        size: 1
      - id: unsized_array
        type: elem
        repeat: expr
        repeat-expr: 2
      - id: sized_array
        type: elem
        size: 3
        repeat: expr
        repeat-expr: 1
  elem:
    seq:
      - id: padding
        type: u1
      - id: value
        type: u1

The following problem is currently being observed:
This show correct location
Type
That location is wrong, must be inside previous region:
Content

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.