Re: Trouble debugging unit tests of framework
Re: Trouble debugging unit tests of framework
- Subject: Re: Trouble debugging unit tests of framework
- From: Tony Romano <email@hidden>
- Date: Thu, 22 Apr 2010 01:06:07 -0700
Ben, I'm sorry I don't have an answer but I had the exact same problem and never found help. If you ever find out something or I do, please share the info. It is most annoying this problem. I was hoping someone from Apple would chime.
Thanks,
-tony
.
On Apr 22, 2010, at 12:18 AM, Ben Golding wrote:
>
> On 19/04/2010, at 16:21, Ben Golding wrote:
>
>> I have a set of unit tests that I am using to test a framework that I'm developing.
>>
>> Following Chris Hanson's blog entry (http://chanson.livejournal.com/119578.html), I have created a custom executable and am injecting the my octest code into that which is working fine insofar as the tests run correctly.
>>
>> The problem I'm having is when I need to debug the unit tests and set a breakpoint in the framework code. No matter what I've tried the breakpoint is never active, it's always displayed as a yellow outline breakpoint which I understand is because Xcode doesn't think that code is loaded.
>
> In fact, this problem seems to be more widespread in my app: I can't set a breakpoint in any code belonging to a framework though it does work in my mainline.
>
> As I mentioned in my last post, I can see the library being loaded (courtesy of DYLD_PRINT_LIBRARIES):
>
> dyld: loaded: /home/bgg/Build/Debug/Forecaster.framework/Versions/A/Forecaster
>
> but none of the breakpoints that I have set are resolved:
>
> (gdb) info break
> Num Type Disp Enb Address What
> 3 breakpoint keep y <PENDING> "LoanForecaster.m":33
> 4 breakpoint keep y <PENDING> "InterestForecaster.m":33
> 5 breakpoint keep y <PENDING> "CashForecaster.m":312
> 6 breakpoint keep y <PENDING> "RevenueExpense.m":93
> 7 breakpoint keep y <PENDING> "NSDate-Forecaster.m":94
> 8 breakpoint keep y <PENDING> "RevenueExpenseSchedule.m":185
> 9 breakpoint keep y <PENDING> "DiscountedForecaster.m":37
> 10 breakpoint keep y <PENDING> "RevenueExpense.m":327
> 11 breakpoint keep n <PENDING> "RevenueExpense.m":296
> 12 breakpoint keep y <PENDING> "RevenueExpense.m":348
> 13 breakpoint keep y 0x9066e9e6 <-[NSException raise]+6>
> 15 breakpoint keep y <PENDING> "RevenueExpense.m":307
>
> I've been hunting around trying to find what the condition is that changes a breakpoint from <PENDING> to being placed but I can't find anything. I understand gdb should note when the framework/shared library is loaded but I don't know how to track that, I mean it should be happening.
>
> I found some comments about changing the debug flag in preferences to "Load symbols lazily" which I've done to no avail.
>
> Um, help ...
>
> Ben. _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden