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


|