| 1 |
""" |
| 2 |
LLDB AppKit formatters |
| 3 |
|
| 4 |
Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 |
See https://llvm.org/LICENSE.txt for license information. |
| 6 |
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 7 |
""" |
| 8 |
import lldb |
| 9 |
|
| 10 |
|
| 11 |
def SEL_Summary(valobj, dict): |
| 12 |
return valobj.Cast( |
| 13 |
valobj.GetType().GetBasicType(lldb.eBasicTypeChar).GetPointerType() |
| 14 |
).GetSummary() |
| 15 |
|
| 16 |
|
| 17 |
def SELPointer_Summary(valobj, dict): |
| 18 |
return ( |
| 19 |
valobj.CreateValueFromAddress( |
| 20 |
"text", |
| 21 |
valobj.GetValueAsUnsigned(0), |
| 22 |
valobj.GetType().GetBasicType(lldb.eBasicTypeChar), |
| 23 |
) |
| 24 |
.AddressOf() |
| 25 |
.GetSummary() |
| 26 |
) |