Author Topic: bug in rev 6045 of handling typedef statement  (Read 9415 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
bug in rev 6045 of handling typedef statement
« on: January 19, 2010, 08:03:44 am »
hi, these codes( see below ) in ParserThread.cpp in HandleTypedef function
Code
        else if (token == _T("*"))
        {
            m_IsPointer = false;
            continue;
        }
        else if (peek == ParserConsts::comma)
        {
            m_Tokenizer.UngetToken();
            if (components.size() != 0)
            {
                wxString ancestor;
                while (components.size() > 0)
                {
                    wxString token = components.front();
                    components.pop();

                    if (!ancestor.IsEmpty())
                        ancestor << _T(' ');
                    ancestor << token;
                    ReadClsNames(ancestor);
                }
            }
        }

were newly added in the rev 6046 to handle something like

Code
typedef struct localeinfo_struct
{
    pthreadlocinfo locinfo;
    pthreadmbcinfo mbcinfo;
} _locale_tstruct, *_locale_t;

But it seems there are some bugs, I'd like someone can help me to solve this bug. Thanks.
If we can't solve this bug, I need to "remove" these code snippet.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: bug in rev 6045 of handling typedef statement
« Reply #1 on: January 19, 2010, 08:08:00 am »
hi,ollydbg

you need to move the codes:
Code
                    ReadClsNames(ancestor);

out of the while statement.

by the way.are you in gtalk?
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: bug in rev 6045 of handling typedef statement
« Reply #2 on: January 19, 2010, 03:44:06 pm »
There's still some thing wrong cc.
rev 6091.
Open the contribute plugin workspace, and active threadsearch plugin.
Then open the "src\plugins\contrib\ThreadSearch\ThreadSearch.h", then you can see there's no class shown in "symbols browser".

Edit:
I just test in an old version(rev 5908), and found that this bug was there too. so, it is an old bug, not introduced recently. :D
« Last Edit: January 19, 2010, 03:51:01 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: bug in rev 6045 of handling typedef statement
« Reply #3 on: January 19, 2010, 04:30:35 pm »
There's still some thing wrong cc.
rev 6091.
Open the contribute plugin workspace, and active threadsearch plugin.
Then open the "src\plugins\contrib\ThreadSearch\ThreadSearch.h", then you can see there's no class shown in "symbols browser".

Edit:
I just test in an old version(rev 5908), and found that this bug was there too. so, it is an old bug, not introduced recently. :D
work here, svn 6091.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: bug in rev 6045 of handling typedef statement
« Reply #4 on: January 20, 2010, 01:30:34 pm »
I just test it and it works now in rev 6091. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.