obfuscator-llvm / obfuscator

3.93k stars 1.18k forks source link

The LLVMObfuscation files can't hit breakpoints in the Xcode project #170

Open iOSPrincekin opened 2 years ago

iOSPrincekin commented 2 years ago

Hi: I wanted to study the obfuscator-llvm project, so I built it into the LLVM.xcodeproj using "cmake -GXcode", after finished building the Xcode project 'clang' scheme, Xcode ran the clang executable, and I had add breakpoints in the BogusControlFlow.cpp、Flattening.cpp、SplitBasicBlocks.cpp、Utils.cpp files in the obfuscator/lib/Transforms/Obfuscation directory, but Xcode not hit the breakpoints not all! I don't why any help will be appreciated!

jowehrli commented 2 years ago

Hey @iOSPrincekin ,

Are you compiling something with the new clang? Did you add the flag to activate the obfuscation (e.g.: -mllvm -fla)?

iOSPrincekin commented 2 years ago

Hey @iOSPrincekin ,

Are you compiling something with the new clang? Did you add the flag to activate the obfuscation (e.g.: -mllvm -fla)?

what new clang? I use the "llvm-4.0" branch of obfuscator.git to build clang and I run the clang with options "-mmacosx-version-min=10.5 -S -emit-llvm -mllvm -sub -mllvm -sub_loop=-3 -mllvm -fla -mllvm -bcf -mllvm -debug -mllvm -bcf_loop=-3 -fno-experimental-new-pass-manager /Users/lee/Desktop/TONGDUN/S/obfuscator/obfuscator/ollvmtests/main.c -o /Users/lee/Desktop/TONGDUN/S/obfuscator/obfuscator/ollvmtests/main.ll"