On startup of my application with gdb, I am getting weird errors that look like:
unable to read unknown load command 0x22
The whole trace looks something like this:
[Session started at 2009-12-17 10:28:24 -0500.]
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".tty /dev/ttys003
Loading program into debugger…
sharedlibrary apply-load-rules all
warning: Unable to read symbols for "@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" (file not found).
warning: Unable to read symbols from "Sparkle" (not yet mapped into memory).
unable to read unknown lo开发者_如何学JAVAad command 0x22
unable to read unknown load command 0x22
Program loaded.
run
[Switching to process 9051 local thread 0x2e03]
Running…
unable to read unknown load command 0x22
unable to read unknown load command 0x22
I have tried every sort of analysis tool available, haven't been able to find any memory leaks or anything that could cause these unknown errors.
Help?
This problem has a two part fix.
One make sure that you have Sparkle Copying in in the Copy Frameworks
build phase.
Secondly, adding the following script as a buildphase after the Copy Frameworks
helps fix the load path on some machines.
install_name_tool -change "@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" "@executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" "$BUILT_PRODUCTS_DIR/$EXECUTABLE_PATH"
Below is a screenshot of what this buildphase looks like in my project.
Build Phase Example http://grab.by/1OkU
And here is a screenshot of my target steps.
Target Steps http://grab.by/1fCu
精彩评论