Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Problem debugging stack variables in constructor: (2 Items)
   
Problem debugging stack variables in constructor  
I'm having problems debugging a constructor of a class.

When I start with main() I can see the stack variables in main. When I step into the class constructor (not the default 
constructor) I see the passed arguments to the constructor, and the member variables, but no local stack variables 
appear in the 'Variables' view for the constructor.

When I hover over any of the stack variables I get the error:

          No symbol "xxx" in current context.

All source files are all part of the same executable and are all in the same directory.

In the 'verbose' gdb console output I see the following:

     ^error,msg="A syntax error in expression, near `'."

I see the following potential problem in the gdb console output,

at

        ptype this

The prototype of the class is listed properly, with the exception of two functions. The return arg is shown as

       ._40 & FuncA(int);\n
       ._40 & FuncB(int);\n

where '._40' appears should be a local typedef. All other function return types are Plain Old Data (int, void, etc.) 
[this seems to be normal behavior as I see this ._xx syntax in other function prototypes in other classes in gdb]

There are no compiler errors or warnings for this code.

I am using QNX 6.4.0 running in a VMWare 2.0 session. I using Windows XP and IDE 4.6.

I don't have this problem with other classes.

Any hints where to look for the problem?
Re: Problem debugging stack variables in constructor  
Could you make a small example that reproduces the problem?

If you do, please post it here so I can take a look.

Thanks,

Aleksandar Ristovski
QNX Software Systems


Keith Smith wrote:
> I'm having problems debugging a constructor of a class.
> 
> When I start with main() I can see the stack variables in main. When I step into the class constructor (not the 
default constructor) I see the passed arguments to the constructor, and the member variables, but no local stack 
variables appear in the 'Variables' view for the constructor.
> 
> When I hover over any of the stack variables I get the error:
> 
>           No symbol "xxx" in current context.
> 
> All source files are all part of the same executable and are all in the same directory.
> 
> In the 'verbose' gdb console output I see the following:
> 
>      ^error,msg="A syntax error in expression, near `'."
> 
> I see the following potential problem in the gdb console output,
> 
> at
> 
>         ptype this
> 
> The prototype of the class is listed properly, with the exception of two functions. The return arg is shown as
> 
>        ._40 & FuncA(int);\n
>        ._40 & FuncB(int);\n
> 
> where '._40' appears should be a local typedef. All other function return types are Plain Old Data (int, void, etc.) 
[this seems to be normal behavior as I see this ._xx syntax in other function prototypes in other classes in gdb]
> 
> There are no compiler errors or warnings for this code.
> 
> I am using QNX 6.4.0 running in a VMWare 2.0 session. I using Windows XP and IDE 4.6.
> 
> I don't have this problem with other classes.
> 
> Any hints where to look for the problem?
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post24374
>