misc: Added line wrapping functionality for Sim-Object desc
authorBobby R. Bruce <bbruce@ucdavis.edu>
Tue, 24 Sep 2019 21:28:29 +0000 (14:28 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Mon, 30 Sep 2019 19:50:26 +0000 (19:50 +0000)
commit772ca27a97239208d5eafb795c7ec92863d671ee
treedc3521b3b7b2da557c1256a97f04e4c09c472f77
parenta2286fe344f0fd6484f232329a56e9f07e2136de
misc: Added line wrapping functionality for Sim-Object desc

Descriptions were previously printed on one line, unless explicitly broken
when writing the description of the Sim-Object. In this commit, line
wrapping is enabled when printing these descriptions. Developers, when
writing the Sim-Object descriptions, may now over multiple lines with
triple double-quotes and still have the description output correctly when
viewing the Sim-Objects within the CLI.

E.g.: X86System previously had the following load_addr_mask component which
was output as:

load_addr_mask
            default: 18446744073709551615
               desc: Address to mask loading binaries with, if 0, system \
auto-calculates the mask to be the most restrictive, otherwise it obeys a \
custom mask.

This was defined by the developer via:

load_addr_mask = Param.UInt64(0xffffffffffffffff,
            "Address to mask loading binaries with, if 0, system "
            "auto-calculates the mask to be the most restrictive, "
            "otherwise it obeys a custom mask.")

This is now displayed as:

load_addr_mask
            default: 18446744073709551615
               desc: Address to mask loading binaries with, if 0,
                     system auto-calculates the mask to be the most
                     restrictive, otherwise it obeys a custom mask.

JiraID: Gem5-57
Built: Linux (GCC)
Tested: Ran quick tests for X86, ARM, and RISC-V
Change-Id: If012304e50af60f6ba10c1fa2b44da8bac1c09cf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21179
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
src/python/SConscript
src/python/m5/main.py
src/python/m5/util/terminal_formatter.py [new file with mode: 0644]