Re: More Framework issues.
Re: More Framework issues.
- Subject: Re: More Framework issues.
- From: Jim Ingham <email@hidden>
- Date: Thu, 27 May 2004 17:35:59 -0700
Chris,
If you don't specify a -seg1addr, then the linker defaults to a value
of 0x0. So by default all the addresses collide. But the dynamic
loader will sort all this out at runtime, both when they all start at
0x0, and when they have been given non-zero addresses that overlap.
The problem with gdb is that we try to set breakpoints in the
frameworks before the target program starts up, and there were some
bugs in the case where all the addresses overlap that could cause the
breakpoints to get set wrong.
There is an even worse bug where we would write the breakpoint into the
target program before the shared library got loaded, and if the
breakpoint address was low enough in the shared library, the breakpoint
would end up being written in the dyld loading instructions in the main
executable (which are all in the first 0x1000 hex of the executable.
This would cause the launch to fail.
The latter will be avoided if you give all your shared libraries
non-zero -seg1addr values, even if the -seg1addr values are ALL the
same...
Anyway, it won't hurt to give -seg1addr addresses to your development
builds, you don't have to choose all that carefully, the loader will
get everything right at runtime, and it will help out gdb.
Hope this helps,
Jim
On May 26, 2004, at 1:03 PM, Chris Dillman wrote:
Some of our smaller frameworks word fine with the debugger.
The larger ones mess up the debugger....
Adding this linking option fixes things.
-seg1addr 0xf8000
The problem is I don't know why this fixes it.
On top of that I don't want to have to start putting seg1addrs in all
our frameworks.
What happens if the addresses collide?
--
Email: email@hidden
iChat / AIM: email@hidden
Buy Art : http://www.starbounce.com
Listen to Music: http://www.trance-o-matic.com
Play Games: Plaid World Studios http://www.plaidworld.com
Learn game programming at http://www.idevgames.com
Day job: Software Engineer for http://www.riskwise.com, Part of
LexisNexis
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.