I have GDB 7.5 installed in my machine. It seems pretty-printers for STL already comes bundled with this version, since running:
(gdb) info pretty-printers
prints a long list of all available STL printers.
Debugging a C++ code that has been compiled with g++ gets the correct behaviour of pretty printing. However, the same is not observed if the same code is compiled with clang++.
Below is an output when I run gdb:
BFD: /usr/lib/libstdc++.6.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libstdc++.6.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libSystem.B.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libSystem.B.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libc++abi.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libc++abi.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcache.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcache.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcommonCrypto.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcommonCrypto.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcompiler_rt.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcompiler_rt.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcopyfile.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcopyfile.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libdispatch.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libdispatch.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libdnsinfo.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libdnsinfo.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libdyld.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libdyld.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libkeymgr.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libkeymgr.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/liblaunch.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/liblaunch.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libmacho.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libmacho.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libquarantine.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libquarantine.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libremovefile.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libremovefile.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_blocks.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_blocks.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_c.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_c.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_dnssd.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_dnssd.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_info.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_info.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_kernel.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_kernel.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_m.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_m.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_network.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_network.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_notify.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_notify.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_sandbox.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_sandbox.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libunc.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libunc.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libunwind.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libunwind.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libxpc.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libxpc.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcorecrypto.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcorecrypto.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libobjc.A.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libobjc.A.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libauto.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libauto.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libc++.1.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libc++.1.dylib(i386:x86-64): unknown load command 0x2b
I would like to know how I can get STL containers pretty-printed when the code was compiled with clang++?
Note that I can debug the application; I just cannot pretty print the STL contents.
The gdb you're using has a list of known Mach-O load command numbers but two new ones were added in Mac OS X 10.8 (LC_SOURCE_VERSION, 0x2a and LC_DYLIB_CODE_SIGN_DRS, 0x2b) and it is complaining that it doesn't know about these. It doesn't need to know about these, there's nothing necessary for the debugger in these load commands. The warnings should be harmless.
You're far better off using either the Apple provided gdb (which doesn't have python support, I know) or using the new debugger supported by Apple, LLDB. lldb is a pretty exciting new debugger that is improving rapidly, Apple has been developing it from scratch (leveraging llvm's existing infrastructure and features as much as possible) over the past few years and it is quite capable today. It was designed from the beginning to be extendable via Python and it is easy to create new data formatters for container types that you may come across.
If you haven't used lldb before, but are familiar with gdb, a useful cheat sheet is the command equivalences page over at http://lldb.llvm.org/lldb-gdb.html
Give lldb a try. It's the future of supported debugging on Mac OS X - there's a lot there to like today and it's getting better every release. It's also open source, you can check it out from http://lldb.llvm.org/ and play with it yourself.
Related
I keep getting this error while trying to start rails in docker.
2023-02-15 13:42:52 [54] WARNING hook before_worker_boot failed with exception (Redis::CannotConnectError) getaddrinfo_a: System error
2023-02-15 13:42:52 [55] WARNING hook before_worker_boot failed with exception (Redis::CannotConnectError) getaddrinfo_a: System error
2023-02-15 13:42:52 [51] WARNING hook before_worker_boot failed with exception (Redis::CannotConnectError) getaddrinfo_a: System error
("GET /csc108/admin" - (172.27.0.1)): #<Redis::CannotConnectError: getaddrinfo_a: System error>
However, it worked for a few times with the same procedure.
I tried to rebuild the image and restart the container
I was debugging the app normally but today I wanted to test it then this happened.
Terminal Error:
Exception: Unable to launch com.example.tubitakbiyo on 7700*******-9633-1DBF73524FA6:
ProcessException: Process exited abnormally:
com.example.tubitakbiyo: -1
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=3):
The request to open "com.example.tubitakbiyo" failed.
The process did launch, but has since exited or crashed.
Command: /usr/bin/arch -arm64e xcrun simctl launch 77F612A*********-633-1DBF73524FA6 com.example.tubitakbiyo --enable-dart-profiling --enable-checked-mode --verify-entry-points --start-paused --observatory-port=0
Error launching application on iPhone 12 Pro.
Exited (sigterm)
Problem Report from MAC:
Reason: tried: '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/MTBBarcodeScanner.framework/MTBBarcodeScanner' (no such file), '/usr/lib/swift/MTBBarcodeScanner.framework/MTBBarcodeScanner' (no such file), '/Users/cidqu/Library/Developer/CoreSimulator/Devices/77F612AC-5F9C-4E78-9633-1DBF73524FA6/data/Containers/Bundle/Application/F3A022D9-62FF-40B5-994C-B07D54C684E7/Runner.app/Frameworks/MTBBarcodeScanner.framework/MTBBarcodeScanner' (no such file), '/Users/cidqu/Library/Developer/CoreSimulator/Devices/77F612AC-5F9C-4E78-9633-1DBF73524FA6/data/Containers/Bundle/Application/F3A022D9-62FF-40B5-994C-B07D54C684E7
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
I don't have any other errors. How can i solve this?
I fixed the problem by unchecking this option, Run Script: [ ] For install builds only
Detox versions tried : 11.0.0, 12.0.0 & 14.5.1
The app runs fine when we run it via Xcode. The Detox build command succeeds as well.
But when I start running detox tests I will get the following error
"/bin/cat /dev/null >/Users/mmoha070/Library/Developer/CoreSimulator/Devices/AC24D39E-8290-4314-90F6-685007DBACA8/data/tmp/detox.last_launch_app_log.out 2>/Users/mmoha070/Library/Developer/CoreSimulator/Devices/AC24D39E-8290-4314-90F6-685007DBACA8/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/mmoha070/Library/Detox/ios/34981937206ec401dcf4fd6235cf1a8a3f71e719/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err AC24D39E-8290-4314-90F6-685007DBACA8 com.7ElevenNow.qa.PhoenixiOS --args -detoxServer ws://localhost:53701 -detoxSessionId 34083615-b6f2-86ea-3b33-84b27024f951" failed with code = 1, stdout and stderr:
detox[75658] ERROR: [exec.js/EXEC_FAIL, #6] com.7ElevenNow.qa.PhoenixiOS: -1
detox[75658] ERROR: [exec.js/EXEC_FAIL, #6] An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.7ElevenNow.qa.PhoenixiOS" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified.
Underlying error (domain=FBSOpenApplicationErrorDomain, code=1):
The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.)
I am exporting a hive table to hdfs using beeline,I am getting error as
Error: Error while compiling statement:
FAILED: SemanticException Error when getting current notification event ID (state=42000,code=40000)"
CoreData: Failed to load optimized model at path /applation/~/project.app/project.momd/Project.omo'
i am using xcode 9