Open topic with navigation
Note: While reading this document you will see
The following sub-sections outline the changes that need to be made to the Unreal Engine 3 (UE3) tool-chain, depending on which Visual Studio project of UE3 solution you would like to debug.
This change is required for all UE3 users to enable debugging as a whole. The UE3 tool-chain renames some of its files during the build process, but GDB requires that the symbols names match the library name.
Otherwise if Win7 and below, you can modify the build scripts to do this automatically. The file we need to modify within the UE3 root directory is:
Just after the following line:
copy %1-Android-%2.so libs\armeabi-v7a\libUnrealEngine3.so > NUL
Add the following:
ECHO Creating a symbolic link to allow debugging because file names must match.
mklink /H libUnrealEngine3.so %1-Android-%2.so > NUL
NOTE: mklink will not work on newer versions of Windows without enhanced permissions. You may need to copy instead.
This modification is recommended to ensure that all call stack entries can retrieve source code files. Only some projects may have problems without this change, but it is easier to make the change sooner than to remember why it is behaving poorly later.
Development\Src\Android\UnrealBuildTool\System\AndroidToolChain.cs inside of the function
GetCLArguments_Global(). From here, find the following line:
Result += "-ffunction-sections";
You can comment this out or move this line to the area lower in the function, to where release optimizations are being applied (such as
–O2). This flag has pros and cons so you should profile your app in release mode and look at the file size since it can affect either in both good or bad ways.
We also recommend:
Result += " -g";|
Result += " -funwind-tables"
Result += " -fno-omit-frame-pointer”
Result += " -marm
Result += " -march=armv7-a";
Result += " -mtune=cortex-a15";
Result += " -mfloat-abi=softfp";
Result += " -mfpu=vfpv4";
Result += " -mfpu=neon-vfpv4";
But for neon, the user must either do additional hand coding of neon assembly, or add additional unsafe math flags and work out the issues that may result.
Some users have chosen to move to newer versions of NDK and even move to the win64 toolchain so that they can make incredibly large linked files. Here are somethings to consider.
You may need to modify the NDKROOT to point to the new NDK. UE3 build tools typically sets its own if this environment variable is not set. This is done in
To move to win64, tools paths in
AndroidToolChain.cs need to switch from
At this point, be sure that your project builds normally. Use
UnrealFrontEnd.exe before using Nsight Tegra, Visual Studio Edition so that
UnrealFrontEnd.exe may load the game level data to the target device. Even with Nsight Tegra, you will need to use this tool to load the game data, but Nsight Tegra will be able to update the game's APK.
In the earlier steps, you have prepared UE3 so that it compiles and packages everything correctly in preparation for debugging. The work there is done by the Unreal Build Tools. Now we must set up a project for the Nsight Tegra debugger to appropriately launch and attach to your UE3 based game.
Working directory =
Path to APK =
Symbols Directories =
Java source code directories =
[GAME] Android, which you would use to compile the game normally.
[GAME] Android. Set it to build and ensure that its platform is Win32. This will enable F5 and other build and debug commands that are needed to compile the complete project.
NVIDIA® GameWorks™ Documentation Rev. 1.0.211026 ©2014-2021. NVIDIA Corporation and affiliates. All Rights Reserved.