Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / February 2004



Tip: Looking for answers? Try searching our database.

No debugging in variables on CW9.1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rene Gutschmidt - 02 Feb 2004 14:15 GMT
Dear All

I have a problem with the CodeWarrior 9.1 Debugger on Mac OS X 10.3.2. The
following code describe my problem. When I debug this code I can't look into
the variable 'str' in function foo(..).

Why - I can't understand that?

--- CODE ---
#include <string>

bool g(const std::string&)
{
   return false;
}

const std::string& f(const std::string& s)
{
   return s;
}

std::string foo( const std::string& value )
{
   std::string str;
   do {
       str += f(value);
   } while( g(value) );
   return str;
}    

int main( int argc, char* argv[] )
{
   std::string str = foo( "Test" );

   return 0;
}
--- CODE ---

Best regards
Rene

-------------------------------------
grenenewsgroup@yahoo.de is never read
I'm grenenewsgroup at web dot de
MW Ron - 02 Feb 2004 17:19 GMT
>Dear All
>
[quoted text clipped - 3 lines]
>
>Why - I can't understand that?

I see it too and don't understand it either,  I'll find out why.

Ron

>--- CODE ---
>#include <string>
[quoted text clipped - 32 lines]
>grenenewsgroup@yahoo.de is never read
>I'm grenenewsgroup at web dot de

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

MW Ron - 03 Feb 2004 18:07 GMT
>Dear All
>
[quoted text clipped - 3 lines]
>
>Why - I can't understand that?

I see this too and don't know why,  I'm checking with engineering.

Ron

>--- CODE ---
>#include <string>
[quoted text clipped - 32 lines]
>grenenewsgroup@yahoo.de is never read
>I'm grenenewsgroup at web dot de

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

Rene Gutschmidt - 04 Feb 2004 07:30 GMT
>> Dear All
>>
[quoted text clipped - 5 lines]
>
> I see this too and don't know why,  I'm checking with engineering.

Thanks for helping - I hope you can find the problem. ;-)

> Ron

Rene

-------------------------------------
grenenewsgroup@yahoo.de is never read
I'm grenenewsgroup at web dot de
Rene Gutschmidt - 09 Feb 2004 09:22 GMT
>> Am 04.02.2004 8:30 Uhr schrieb "Rene Gutschmidt" unter
>> <grenenewsgroup@yahoo.de> in BC465E2E.1FD8%grenenewsgroup@yahoo.de:

> In article <BC441A06.1948%grenenewsgroup@yahoo.de>,
> Rene Gutschmidt <grenenewsgroup@yahoo.de> wrote:
[quoted text clipped - 8 lines]
>>
> I see this too and don't know why,  I'm checking with engineering.

Dear Ron

I wanted to ask whether a solution was found? Or do you know what the
problem is?

Is that maybe a compiler/linker/debugger setting?

Rene

> Ron

-------------------------------------
grenenewsgroup@yahoo.de is never read
I'm grenenewsgroup at web dot de

MW Ron - 09 Feb 2004 16:00 GMT
Changing this around a bit...

>I wanted to ask whether a solution was found? Or do you know what the
>problem is?

I tested this with 9.2 and it still behaves the same.

>Is that maybe a compiler/linker/debugger setting?

I played with some settings and didn't get any better result.  I'm not
sure if this is GDB or CW it appears to be a CW bug to me.

I'll submit this to engineering and put it in the bug database as well
as try to get it in the Beta problems.

thanks for your patience and thanks for the reminder.  I do like to be
reminded.

Ron

Here is the original problem

I have a problem with the CodeWarrior 9.1 Debugger on Mac OS X 10.3.2.
The
following code describe my problem. When I debug this code I can't look
into
the variable 'str' in function foo(..).

Why - I can't understand that?

--- CODE ---
#include <string>

bool g(const std::string&)
{
   return false;
}

const std::string& f(const std::string& s)
{
   return s;
}

std::string foo( const std::string& value )
{
   std::string str;
   do {
       str += f(value);
   } while( g(value) );
   return str;
}    

int main( int argc, char* argv[] )
{
   std::string str = foo( "Test" );

   return 0;
}
--- CODE ---

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

MW Ron - 10 Feb 2004 21:07 GMT
>Dear All
>
[quoted text clipped - 3 lines]
>
>Why - I can't understand that?

Some updated information...

Engineering played around with this a bit and found that in the function
foo() if you don't use the local variable 'str' as the function's return
value, or if you change the return type to 'std::string&' then the
variable 'str' is correctly in the local variables list.

We are treating this ike a problem with symbol generation and will try
to solve it.

Ron

>--- CODE ---
>#include <string>
[quoted text clipped - 32 lines]
>grenenewsgroup@yahoo.de is never read
>I'm grenenewsgroup at web dot de

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

Rene Gutschmidt - 12 Feb 2004 11:25 GMT
Am 10.02.2004 22:07 Uhr schrieb "MW Ron" unter <mwron@metrowerks.com> in
mwron-25E5D3.16070610022004@news.newsguy.com:

>> Dear All
>>
[quoted text clipped - 10 lines]
> value, or if you change the return type to 'std::string&' then the
> variable 'str' is correctly in the local variables list.

> We are treating this ike a problem with symbol generation and will try
> to solve it.

Thanks for the information. Will this problem be solved in the next update
(9.2)? I "stumble" quite often over this problem in my source code. ;-)

Rene

> Ron
>
[quoted text clipped - 30 lines]
>> Best regards
>> Rene

-------------------------------------
grenenewsgroup@yahoo.de is never read
I'm grenenewsgroup at web dot de
MW Ron - 12 Feb 2004 14:23 GMT
>Am 10.02.2004 22:07 Uhr schrieb "MW Ron" unter <mwron@metrowerks.com> in
>mwron-25E5D3.16070610022004@news.newsguy.com:
[quoted text clipped - 19 lines]
>Thanks for the information. Will this problem be solved in the next update
>(9.2)? I "stumble" quite often over this problem in my source code. ;-)


I don't think so,  it depends on when 9.2 comes out.  Since it doesn't
rise to the priority 1 level they won't hold a patch up for it, and I
don't think it will be fixed in time.

Ron

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.