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

Describe JDWP messages. #56

Open
michalgr opened this issue Sep 5, 2023 · 0 comments
Open

Describe JDWP messages. #56

michalgr opened this issue Sep 5, 2023 · 0 comments

Comments

@michalgr
Copy link
Contributor

michalgr commented Sep 5, 2023

Implement a set of python modules containing objects describing layout of JDWP messages.

An example of such description could look like this:

Version = Command(
    name="version",
    id=1,
    out=None,
    reply=Struct([
        Field("description", types.String),
        Field("jdwp major", types.Int),
        Field("jdwp minor", types.Int),
        Field("vm version", types.String),
        Field("vm name", types.String),
    ]),
)

ClassesBySignature = Command(
    name="classes by signature",
    id=2,
    out=Struct([
        Field("signature", types.String),
    ]),
    reply=Struct([
      ...
    ]),
)

...

VirtualMachine = CommandSet(
    name="VirtualMachine",
    id=1,
    commands=[
      Version,
      ClassesBySignature,
    ],
)

The schema should allow us to express common data types (see table at the bottom of this page), compound structures, arrays (see ClassesBySignature command) and tagged unions (see Composite Command). Schema and each command set should be defined in a separate module. Such JDWP description should support pattern matching as a major tool to analyze shape of structs.

Having such description will allow us to write codegen tools generating JDWP data structures and parsers/serializers for different programming languages.

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