xref: /llvm-project/lldb/examples/summaries/cocoa/Selector.py (revision b9c1b51e45b845debb76d8658edabca70ca56079)
1"""
2LLDB AppKit formatters
3
4part of The LLVM Compiler Infrastructure
5This file is distributed under the University of Illinois Open Source
6License. See LICENSE.TXT for details.
7"""
8import lldb
9
10
11def SEL_Summary(valobj, dict):
12    return valobj.Cast(valobj.GetType().GetBasicType(
13        lldb.eBasicTypeChar).GetPointerType()).GetSummary()
14
15
16def SELPointer_Summary(valobj, dict):
17    return valobj.CreateValueFromAddress(
18        'text', valobj.GetValueAsUnsigned(0), valobj.GetType().GetBasicType(
19            lldb.eBasicTypeChar)).AddressOf().GetSummary()
20