mirror of https://github.com/pwndbg/pwndbg.git
Refactor context backtrace to use ColorConfig (#1325)
parent
4bd4bda36d
commit
9c731ae7cd
@ -1,33 +0,0 @@
|
|||||||
import pwndbg.color.theme as theme
|
|
||||||
from pwndbg.color import generateColorFunction
|
|
||||||
from pwndbg.gdblib import config
|
|
||||||
|
|
||||||
config_prefix = theme.add_param("backtrace-prefix", "►", "prefix for current backtrace label")
|
|
||||||
config_prefix_color = theme.add_color_param(
|
|
||||||
"backtrace-prefix-color", "none", "color for prefix of current backtrace label"
|
|
||||||
)
|
|
||||||
config_address_color = theme.add_color_param(
|
|
||||||
"backtrace-address-color", "none", "color for backtrace (address)"
|
|
||||||
)
|
|
||||||
config_symbol_color = theme.add_color_param(
|
|
||||||
"backtrace-symbol-color", "none", "color for backtrace (symbol)"
|
|
||||||
)
|
|
||||||
config_label_color = theme.add_color_param(
|
|
||||||
"backtrace-frame-label-color", "none", "color for backtrace (frame label)"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def prefix(x):
|
|
||||||
return generateColorFunction(config.backtrace_prefix_color)(x)
|
|
||||||
|
|
||||||
|
|
||||||
def address(x):
|
|
||||||
return generateColorFunction(config.backtrace_address_color)(x)
|
|
||||||
|
|
||||||
|
|
||||||
def symbol(x):
|
|
||||||
return generateColorFunction(config.backtrace_symbol_color)(x)
|
|
||||||
|
|
||||||
|
|
||||||
def frame_label(x):
|
|
||||||
return generateColorFunction(config.backtrace_frame_label_color)(x)
|
|
||||||
Loading…
Reference in new issue