|
|
|
@ -37,6 +37,11 @@ TYPES = {
|
|
|
|
bool: gdb.PARAM_BOOLEAN
|
|
|
|
bool: gdb.PARAM_BOOLEAN
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getParam(value):
|
|
|
|
|
|
|
|
for k,v in TYPES.items():
|
|
|
|
|
|
|
|
if isinstance(value, k):
|
|
|
|
|
|
|
|
return v
|
|
|
|
|
|
|
|
|
|
|
|
class Parameter(gdb.Parameter):
|
|
|
|
class Parameter(gdb.Parameter):
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, name, default, docstring):
|
|
|
|
def __init__(self, name, default, docstring):
|
|
|
|
@ -47,7 +52,7 @@ class Parameter(gdb.Parameter):
|
|
|
|
self.show_doc = docstring + ':'
|
|
|
|
self.show_doc = docstring + ':'
|
|
|
|
super(Parameter, self).__init__(name,
|
|
|
|
super(Parameter, self).__init__(name,
|
|
|
|
gdb.COMMAND_SUPPORT,
|
|
|
|
gdb.COMMAND_SUPPORT,
|
|
|
|
TYPES[type(default)])
|
|
|
|
getParam(default))
|
|
|
|
self.value = default
|
|
|
|
self.value = default
|
|
|
|
|
|
|
|
|
|
|
|
setattr(module, self.name, self)
|
|
|
|
setattr(module, self.name, self)
|
|
|
|
|