Fix the debugger not being able to show TCHAR *

This commit is contained in:
2024-11-25 15:20:33 -05:00
parent 75dcdf54cc
commit 979b8d4a07
2 changed files with 32 additions and 0 deletions

View File

@@ -1,3 +1,28 @@
diff --git a/Engine/Extras/LLDBDataFormatters/UEDataFormatters_2ByteChars.py b/Engine/Extras/LLDBDataFormatters/UEDataFormatters_2ByteChars.py
index f56f5ea9cac4..ff1c4030b38f 100644
--- a/Engine/Extras/LLDBDataFormatters/UEDataFormatters_2ByteChars.py
+++ b/Engine/Extras/LLDBDataFormatters/UEDataFormatters_2ByteChars.py
@@ -32,7 +32,7 @@ def UETCharSummaryProvider(valobj,dict):
if DataVal == 0:
Val = 'NULL'
else:
- Expr = '(char16_t*)(%s)' % Data
+ Expr = '(char16_t*)(%s)' % DataVal
ValRef = valobj.CreateValueFromExpression('string', Expr)
Val = ValRef.GetSummary()
elif Type.IsReferenceType():
@@ -47,6 +47,11 @@ def UETCharSummaryProvider(valobj,dict):
Expr = '(char16_t*)(%s)' % valobj.GetAddress()
ValRef = valobj.CreateValueFromExpression('string', Expr)
Val = ValRef.GetSummary()
+ else:
+ DataVal = valobj.GetValueAsUnsigned(0)
+ Expr = '(char16_t)(%s)' % DataVal
+ ValRef = valobj.CreateValueFromExpression('string', Expr)
+ Val = ValRef.GetSummary()
return Val
def UESignedCharSummaryProvider(valobj,dict):
diff --git a/Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp b/Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp diff --git a/Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp b/Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp
index ca5f4b5fb5ff..a436a624d5b7 100644 index ca5f4b5fb5ff..a436a624d5b7 100644
--- a/Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp --- a/Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp

View File

@@ -229,6 +229,13 @@ WORKSPACE["settings"]["files.watcherExclude"] = {
f'{UNREALENGINE}/Templates/**' : True f'{UNREALENGINE}/Templates/**' : True
} }
#
# Tell the LLDB plugin not to dereference pointers. This is dumb behavior,
# it dereferences "char *" and shows only the first character. Not dereferencing
# the pointer shows the whole string.
#
WORKSPACE["settings"]["lldb.dereferencePointers"] = false
# #
# Write Integration.code-workspace. # Write Integration.code-workspace.
# #