Index: third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl |
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl |
index 7538e8bf5e96876a87e51d7ea9b2ff0ab11a1a20..4d3f54dbc13e53b48f1541c56f55db2a39107d9b 100644 |
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl |
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl |
@@ -135,5 +135,12 @@ class {{struct|name}} extends bindings.Struct { |
{%- endfor %} |
{%- endfor %} |
} |
+ |
+ String toString() { |
+ return "{{struct|name}}(" |
+{%- for packed_field in struct.packed.packed_fields %} |
+ "{{packed_field.field|name}}: ${{packed_field.field|name}}" {% if not loop.last %}", "{% endif %} |
+{%- endfor %}")"; |
+ } |
} |
{%- endmacro %} |