Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Code Warrior > Re: Debugging p...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 6 Topic 467 of 537
Post > Topic >>

Re: Debugging problem with CW 9.5 and Tiger

by "Mythic Wave" <brian@[EMAIL PROTECTED] > Jun 24, 2005 at 02:15 PM

Yes, this was the problem.  I know I've run into this before but it must 
have been a long time ago.  But I thought there was a way to prevent the
use 
of registers - something like the opposite of a "volatile" or "register" 
declaration.

Brian

"MW Ron" <mwron@[EMAIL PROTECTED]
> wrote in message 
news:mwron-160675.16525424062005@[EMAIL PROTECTED]
> In article <d9g0i6026r8@[EMAIL PROTECTED]
>,
> "Mythic Wave" <brian@[EMAIL PROTECTED]
> wrote:
>
>>OK, here are a few clues...
>>
>>1) I installed XCode 2.1.  Nothing changed except for the value of err,
>>which is now -980 instead of -868.
>>
>>2) This is a C program, not C++.
>>
>>3) The err variable uses register @[EMAIL PROTECTED]
 in the Location column.
>>
>>4) If I add a line of code something like:
>>        err = 0
>>    somewhere at the top of the function, everything works better, and
err
>>changes values when it is assigned to a function return value.
>
> If err isn't accessed within the function it isn't updated.  I don't
> think this is any different than it ever has been.
>
> I don't think I understood the question before.   There probably is
> register coloring going on and since you assign a value to err  but
> never use err in the function it doesn't change.
>
> What happens if you have
>
> fun()
> {
>   err = fun2();
> }
>
> then register coloring occurs but...
>
> OSErr fun()
> {
>   err = fun2();
>   return err;
> }
>
> Then it will update
>
> Ron
>
>
>>Could it be something in my language settings or other panel?  Maybe I
can
>>turn off the option to use registers or something like that.  It still 
>>seems
>>like something screwy is going on with the debugger.
>>
>>Thanks,
>>
>>Brian
>>
>>
>>"MW Ron" <mwron@[EMAIL PROTECTED]
> wrote in message
>>news:mwron-CFDF80.15314823062005@[EMAIL PROTECTED]
>>> In article <d9em1801aln@[EMAIL PROTECTED]
>,
>>> "Mythic Wave" <brian@[EMAIL PROTECTED]
> wrote:
>>>
>>>>I'm having basic debugging problems building a Carbon app on Tiger
with 
>>>>CW
>>>>9.5.  In my main function, I have the following line:
>>>>
>>>>OSErr err = noErr;
>>>>
>>>>However, the debugger always shows the value of err = -868, even after
I
>>>>set
>>>>it as the return value from other functions.  Optimizations are turned
>>>>off.
>>>>I'm also getting bus errors.  Do I need to go back to OS 10.3.9 to get

>>>>the
>>>>CW debugger to work?
>>>>
>>>>Thanks,
>>>
>>> I think you might need to update XCode Tools or get the GDB4CW that is
>>> out there
>>>
>>> http://sourceforge.net/project/showfiles.php?group_id=111859
>>>
>>> Ron
>>>
>>> -- 
>>> CodeWarrior Community Forum is a free online resource for developers
>>> to discuss CodeWarrior topics with other users and our staff
>>>        --   http://www.codewarrior.com/community
 --
>>>
>>> Ron Liechty - MWRon@[EMAIL PROTECTED]
 - http://www.codewarrior.com
>>
>>
>
> -- 
> CodeWarrior Community Forum is a free online resource for developers
> to discuss CodeWarrior topics with other users and our staff
>        --   http://www.codewarrior.com/community
 --
>
> Ron Liechty - MWRon@[EMAIL PROTECTED]
 - http://www.codewarrior.com
 




 6 Posts in Topic:
Debugging problem with CW 9.5 and Tiger
"Mythic Wave" &  2005-06-23 08:55:20 
Re: Debugging problem with CW 9.5 and Tiger
MW Ron <mwron@[EMAIL P  2005-06-23 15:31:48 
Re: Debugging problem with CW 9.5 and Tiger
"Mythic Wave" &  2005-06-23 13:47:48 
Re: Debugging problem with CW 9.5 and Tiger
"Mythic Wave" &  2005-06-23 21:01:11 
Re: Debugging problem with CW 9.5 and Tiger
MW Ron <mwron@[EMAIL P  2005-06-24 16:52:54 
Re: Debugging problem with CW 9.5 and Tiger
"Mythic Wave" &  2005-06-24 14:15:09 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Sep 5 23:40:43 CDT 2008.