Files
UnrealEngineUWP/Engine/Build/BatchFiles/Mac/SourceCodeLookup.sh
calvin zheng 2267ffd9e4 Improve source code lookup feature, using dsym if exists, and fix file path obtained from build machine
#jira UE-198540
#rb Josh.Adams

[CL 29653403 by calvin zheng in ue5-main branch]
2023-11-10 15:42:43 -05:00

19 lines
549 B
Bash
Executable File

#!/bin/sh
# Copyright Epic Games, Inc. All Rights Reserved.
FunctionName=$1
DylibFullPath=$2
DsymFullPath=$3
if [ -f "$DylibFullPath" ]; then
# Use .dsym file if provided and exists
if [ ! -z "$DsymFullPath" ] && [ -f "$DsymFullPath" ]; then
nm -Cg "$DylibFullPath" | grep "\b$FunctionName\b" | cut -d' ' -f1 | atos --fullPath -o "$DsymFullPath"
else
nm -Cg "$DylibFullPath" | grep "\b$FunctionName\b" | cut -d' ' -f1 | atos --fullPath -o "$DylibFullPath"
fi
else
echo "$DylibFullPath does not exist"
exit 1
fi