Re: Problems setting breakpoints
Re: Problems setting breakpoints
- Subject: Re: Problems setting breakpoints
- From: Jim Ingham <email@hidden>
- Date: Wed, 5 Nov 2003 10:45:06 -0800
Andrew,
The problem here is that right now the gdb breakpoint model is that
there is a one-to-one correspondence between breakpoints and physical
addresses. So when you say "break foo" gdb looks around till it finds
the first instance of foo, and puts a breakpoint there. This causes a
bunch of different problems (think file:line breakpoints in a template
or inlined function, for instance) and we know we need to fix this.
There is a bit of plumbing work to do before we can, however...
Another useful command would be some kind of "restrict the breakpoint
search to this shared library". That is also something we plan to do,
but it isn't there yet.
For the short term, you can work around this by using the "rbreak"
command in the console. This command sets breakpoints on all symbols
that match a given regular expression. Since it does do an exhaustive
search through the symbols, "rbreak foo" will set breakpoints on all
instances of the function foo (though you may get other breakpoints as
well that you will have to delete. If you do this after both bundles
are loaded, that should work for you.
Jim
On Nov 5, 2003, at 9:46 AM, Andrew Kimpton wrote:
I have a somewhat 'odd' setup in my code that seems to be defeating
Xcode's breakpoint setting mechanisms :
I have a bundle A which is linked against a static library Z. Bundle A
also later in execution causes a Dynamic Library B to be loaded, B is
also statically linked against the same library Z (the same libZ.a
file even)
Although I can set breakpoints in the code that is unique to A and B
and they're enabled correctly, and execution stops in the right places
any breakpoints I set within code in the static library Z are only
tripped if that code is called from A.
Is there a way to 'coerce' or manually set breakpoints in the static
library Z so that they're also tripped when called from B ? Perhaps
using the gdb console ? I can stop execution just before or after B is
loaded if I have to manually set breakpoints at that time.
Any other suggestions ?
Andrew 8-)
_______________________________________________
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.
--
Jim Ingham email@hidden
Developer Tools
Apple Computer
_______________________________________________
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.