|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +--- |
| 4 | + |
| 5 | +import SchemaViewer from "@site/src/components/SchemaViewer"; |
| 6 | + |
| 7 | +# Overview |
| 8 | + |
| 9 | +:::tip[Summary] |
| 10 | + |
| 11 | +Objects in the **ethdebug/format/info** schema organize debugging data |
| 12 | +associated with a particular compilation. This includes lookup tables of |
| 13 | +types and pointers by their unique name identifiers, as well as optionally may |
| 14 | +include additional information such as complete program listings and compiled |
| 15 | +source contents. |
| 16 | + |
| 17 | +::: |
| 18 | + |
| 19 | +This schema serves as a root schema, in that it (a) aggregates |
| 20 | +all other schemas in this format (either directly or indirectly), and (b) in |
| 21 | +that no other schema aggregates it. |
| 22 | + |
| 23 | +This schema serves as a suitable target for |
| 24 | +[JSON Schema bundling](https://json-schema.org/understanding-json-schema/structuring#bundling), |
| 25 | +e.g., for implementations that want to reduce complexity around validating |
| 26 | +**ethdebug/format** records and don't want to handle reference resolution |
| 27 | +across schema YAML files. |
| 28 | + |
| 29 | +:::warning |
| 30 | + |
| 31 | +**Note**, however, that "root schema" does not imply "objects in the schema |
| 32 | +always contain all relevant debugging data". Due to widespread practice among |
| 33 | +EVM language compilers to produce their own structured JSON output, objects in |
| 34 | +this schema are not necessarily complete records of debug information. |
| 35 | + |
| 36 | +Compilers may choose to divide **distinct portions of debugging data** into |
| 37 | +**distinct sections of compiler JSON output**. For instance, it likely makes |
| 38 | +sense for a compiler to produce debugging data about a particular contract's |
| 39 | +bytecode alongside that contract bytecode's other output information. |
| 40 | + |
| 41 | +At least until tooling accommodates this concern, debugging implementers |
| 42 | +**must** be aware that they will likely need to aggregate debugging data from |
| 43 | +multiple sections of each supported compiler's own output format. |
| 44 | + |
| 45 | +::: |
| 46 | + |
| 47 | +**However**, this schema _is suitable_ for representing a complete and |
| 48 | +standalone debugging data record for a particular compilation, but |
| 49 | +note the optionality of fields such as `compilation` and `programs`. |
| 50 | +Implementations looking to produce such self-contained debugging data objects |
| 51 | +should study the structure of these (and any other optional fields) and ensure |
| 52 | +that such fields are fully populated. |
0 commit comments