public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/sphinx] Improve JSON code-blocks. Date: Wed, 9 Jun 2021 05:36:04 +0000 (GMT) [thread overview] Message-ID: <20210609053604.0E04C3848427@sourceware.org> (raw) https://gcc.gnu.org/g:c7768f068398b267756b767f7d2f4d06d1292a8e commit c7768f068398b267756b767f7d2f4d06d1292a8e Author: Martin Liska <mliska@suse.cz> Date: Wed Jun 9 07:35:48 2021 +0200 Improve JSON code-blocks. Diff: --- gcc/doc/gcov.texi | 50 +++++++++++++++++++++++++------------------------- gcc/doc/invoke.texi | 3 +-- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index e3f528ec835..3d90bf92d44 100644 --- a/gcc/doc/gcov.texi +++ b/gcc/doc/gcov.texi @@ -158,11 +158,11 @@ Structure of the JSON is following: @smallexample @{ - "current_working_directory": @var{current_working_directory}, - "data_file": @var{data_file}, - "format_version": @var{format_version}, - "gcc_version": @var{gcc_version} - "files": [@var{file}] + "current_working_directory": "foo/bar", + "data_file": "a.out", + "format_version": "1", + "gcc_version": "11.1.1 20210510" + "files": ["$file"] @} @end smallexample @@ -187,9 +187,9 @@ Each @var{file} has the following form: @smallexample @{ - "file": @var{file_name}, - "functions": [@var{function}], - "lines": [@var{line}] + "file": "a.c", + "functions": ["$function"], + "lines": ["$line"] @} @end smallexample @@ -204,15 +204,15 @@ Each @var{function} has the following form: @smallexample @{ - "blocks": @var{blocks}, - "blocks_executed": @var{blocks_executed}, - "demangled_name": "@var{demangled_name}, - "end_column": @var{end_column}, - "end_line": @var{end_line}, - "execution_count": @var{execution_count}, - "name": @var{name}, - "start_column": @var{start_column} - "start_line": @var{start_line} + "blocks": 2, + "blocks_executed": 2, + "demangled_name": "foo", + "end_column": 1, + "end_line": 4, + "execution_count": 1, + "name": "foo", + "start_column": 5, + "start_line": 1 @} @end smallexample @@ -256,11 +256,11 @@ Each @var{line} has the following form: @smallexample @{ - "branches": [@var{branch}], - "count": @var{count}, - "line_number": @var{line_number}, - "unexecuted_block": @var{unexecuted_block} - "function_name": @var{function_name}, + "branches": ["$branch"], + "count": 2, + "line_number": 15, + "unexecuted_block": false, + "function_name": "foo", @} @end smallexample @@ -287,9 +287,9 @@ Each @var{branch} has the following form: @smallexample @{ - "count": @var{count}, - "fallthrough": @var{fallthrough}, - "throw": @var{throw} + "count": 11, + "fallthrough": true, + "throw": false @} @end smallexample diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0e349623108..4a9dbd39f31 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5112,8 +5112,7 @@ might be printed in JSON form (after formatting) like this: @} ] "column-origin": 1, - @}, - @dots{} + @} ] @end smallexample
reply other threads:[~2021-06-09 5:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210609053604.0E04C3848427@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).