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,
],
)
Having such description will allow us to write codegen tools generating JDWP data structures and parsers/serializers for different programming languages.
Implement a set of python modules containing objects describing layout of JDWP messages.
An example of such description could look like this:
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.