scons: Separate debug flags from debug-format flags
Debug flags are flags that aid with debugging by printing relevant information when enabled. Debug-formatting flags define how the debug flags will print the information. Although a viability, this patch does not support declaring compound format flags. As a side effect, now debug flags and debug-formatting flags are printed in different lists, when using --debug-help. Change-Id: Ieae68745276218cf4e9c1d37d7bf3bd1f19709ae Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39076 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
58ccc6287e
commit
4ff5fa567b
@@ -35,8 +35,8 @@ def help():
|
||||
sorted_flags = sorted(flags.items(), key=lambda kv: kv[0])
|
||||
|
||||
print("Base Flags:")
|
||||
for name, flag in filter(lambda kv: not isinstance(kv[1], CompoundFlag),
|
||||
sorted_flags):
|
||||
for name, flag in filter(lambda kv: isinstance(kv[1], SimpleFlag)
|
||||
and not kv[1].isFormat, sorted_flags):
|
||||
print(" %s: %s" % (name, flag.desc))
|
||||
print()
|
||||
print("Compound Flags:")
|
||||
@@ -45,6 +45,11 @@ def help():
|
||||
print(" %s: %s" % (name, flag.desc))
|
||||
printList([ c.name for c in flag.kids() ], indent=8)
|
||||
print()
|
||||
print("Formatting Flags:")
|
||||
for name, flag in filter(lambda kv: isinstance(kv[1], SimpleFlag)
|
||||
and kv[1].isFormat, sorted_flags):
|
||||
print(" %s: %s" % (name, flag.desc))
|
||||
print()
|
||||
|
||||
class AllFlags(Mapping):
|
||||
def __init__(self):
|
||||
|
||||
Reference in New Issue
Block a user