mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 959452 - Add lldb summaries for nsACString and nsAString. r=ehsan
This commit is contained in:
parent
375841869f
commit
bc86bc0104
@ -1,6 +1,6 @@
|
||||
import lldb
|
||||
|
||||
__all__ = ['content', 'layout', 'utils']
|
||||
__all__ = ['content', 'general', 'layout', 'utils']
|
||||
|
||||
def init():
|
||||
for name in __all__:
|
||||
|
11
python/lldbutils/lldbutils/general.py
Normal file
11
python/lldbutils/lldbutils/general.py
Normal 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")
|
Loading…
Reference in New Issue
Block a user