Alvin

Results 65 comments of Alvin

> Is lldb able to find the debug info? Can you find out where lldb is looking for it? Thanks. yes, I have tried lldb: ```sh vin@Mac co]$ cd build/macosx/x86_64/release/...

Run without lldb(I use backtrace_full() to get the stack info): ```sh vin@Mac release]$ ./stack F0921 11:57:30.560] SIGSEGV: segmentation fault no debug info in Mach-O executable errno: -1 no debug info...

On Linux, It works well: ```sh alvin@Envy:/mnt/d/cc/co/build/linux/x86_64/release (dev) $ ./stack F0921 12:02:19.256] SIGSEGV: segmentation fault #0 in a() at test/stack.cc:15 #1 in b() at test/stack.cc:20 #2 in c() at test/stack.cc:24...

> Thanks. I don't have a macOS system. Can you run lldb under the macOS equivalent of `strace` to find out where it is getting the debug info? If it...

> Thanks, but that's not what I need to know. > > The compiler puts debug info somewhere, and lldb reads the debug info in order to debug. libbacktrace also...

ok, thanks, I'll try it later tonight.

Maybe I have found the problem. We used a different `sysroot` on mac os. ```sh "/usr/bin/xcrun -sdk macosx clang++" -o build/macosx/x86_64/release/xx build/.objs/xx/macosx/x86_64/release/test/xx.cc.o -arch x86_64 -mmacosx-version-min=10.13 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -stdlib=libc++ -Lbuild/macosx/x86_64/release -lco...

And there is another sdk directory: ```sh vin@Mac MacOSX10.14.sdk]$ xcrun --show-sdk-path /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk vin@Mac MacOSX10.14.sdk]$ pwd /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk vin@Mac MacOSX10.14.sdk]$ ls Entitlements.plist SDKSettings.plist usr/ SDKSettings.json System/ vin@Mac MacOSX10.14.sdk]$ ls usr/lib/system/libunwind* usr/lib/system/libunwind.tbd ```

@ianlancetaylor I got the following result with `dtruss`, It seems that lldb found debug info from `/Library/Developer/CommandLineTools/usr/lib`. ```sh vin@Mac release]$ sudo dtruss -f lldb ./stack PID/THRD SYSCALL(args) = return 714/0x1c70:...

@ianlancetaylor More details can be found here: [https://github.com/idealvin/tmp/blob/master/stack.log](https://github.com/idealvin/tmp/blob/master/stack.log). The above `stack.log` is the result of `sudo dtruss -f ./x.sh`. `x.sh` is as follow: ```sh #!/bin/bash lldb -b -o r -k...