From 256443d0fb8fe4e8de157b716170edfda3f25205 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Wed, 18 Oct 2023 17:33:05 -0400 Subject: make print_all_types example easier to read --- docs/dev/annotation.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'docs/dev') diff --git a/docs/dev/annotation.md b/docs/dev/annotation.md index 80da9ac4..03d676bc 100644 --- a/docs/dev/annotation.md +++ b/docs/dev/annotation.md @@ -447,8 +447,24 @@ Importing a header goes through the same code path as parsing source directly. Y Exporting a header uses the `TypePrinter.print_all_types` api, and outputs a string. ```python ->>> TypePrinter.default.print_all_types(bv.types.items(), bv) -'//------------------------------------------------------------------------------\n// Types for /bin/ls\n//\n// This header file generated by Binary Ninja\n//------------------------------------------------------------------------------\n\n#ifndef BN_TYPE_PARSER\n#include \n#include \n#include \n#include \n#include \n\n#define __packed\n#define __noreturn\n#define __convention(name)\n...' +>>> print(TypePrinter.default.print_all_types(bv.types.items(), bv)) +//------------------------------------------------------------------------------ +// Types for /bin/ls +// +// This header file generated by Binary Ninja +//------------------------------------------------------------------------------ + +#ifndef BN_TYPE_PARSER +#include +#include +#include +#include +#include + +#define __packed +#define __noreturn +#define __convention(name) +... ``` -- cgit v1.3.1