Bug 959452 - Add lldb summaries for nsACString and nsAString. r=ehsan

This commit is contained in:
Cameron McCormack 2014-01-15 11:29:36 +11:00
parent 375841869f
commit bc86bc0104
2 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,6 @@
import lldb
__all__ = ['content', 'layout', 'utils']
__all__ = ['content', 'general', 'layout', 'utils']
def init():
for name in __all__:

View File

@ -0,0 +1,11 @@
import lldb
from lldbutils import utils
def summarize_string(valobj, internal_dict):
data = valobj.GetChildMemberWithName("mData")
length = valobj.GetChildMemberWithName("mLength").GetValueAsUnsigned(0)
return utils.format_string(data, length)
def init(debugger):
debugger.HandleCommand("type summary add nsAString_internal -F lldbutils.general.summarize_string")
debugger.HandleCommand("type summary add nsACString_internal -F lldbutils.general.summarize_string")