Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

New code completion remarks/issues

<< < (22/54) > >>

ollydbg:

--- Quote from: blueshake on October 05, 2009, 06:36:23 am ---
--- Quote from: ollydbg on October 05, 2009, 06:06:39 am ---@blueshake:

look at the Get function prototype, it is a static function.

--- Code: ---class DLLIMPORT Manager
{
    static Manager* Get();
}

--- End code ---
but, in the symbol tree debug dialog, you will see that the

--- Quote ---type is Manager *
actual type is Manager
--- End quote ---

That's may be the cause of bug...



--- End quote ---
But it worked before.I updated the local copy,and it don't work.
look at these codes.The static are ignored.

--- Code: ---        else if (token==ParserConsts::kw_static ||
            token==ParserConsts::kw_virtual ||
            token==ParserConsts::kw_inline)
        {
            // do nothing (skip it)
        }
--- End code ---

--- End quote ---

Hi, after one and a half hour examing. I find the bug, and the patch to fix it.


--- Code: ---Index: nativeparser.cpp
===================================================================
--- nativeparser.cpp (revision 5834)
+++ nativeparser.cpp (working copy)
@@ -1465,7 +1465,7 @@
                 tokenType = pttNamespace;
             else
                 tokenType = pttClass;
-            line.Remove(0, startAt + 2);
+            line.Remove(0, startAt + 1);
         }
         else
             line.Clear();

--- End code ---

Here is the explanation:

For the code:

--- Code: ---Manager::Get()->

--- End code ---
The nativeparser should divide the line to "Manager" and "Get".

The current trunk code just mistakenly divide to "Manager" and "et", so, this patch can solve the bug.

blueshake:
Cool man.

I just check the codes,found that we used IsOperatorEnd(startAt, line),so this is why patch should be applied.

@ollydbg
watch these codes in nativeparser.cpp

--- Code: ---        startAt = BeginOfToken(startAt, line);

        // Check for [Class]. ('.' pressed)
        if (IsOperatorDot(startAt, line))
        {
            --startAt;
            repeat = true; // yes -> repeat.
        }
        // Check for [Class]-> ('>' pressed)
        // Check for [Class]:: (':' pressed)
        else if (IsOperatorEnd(startAt, line))
        {
            startAt -= 2;
            repeat = true; // yes -> repeat.
        }
--- End code ---
[/s]

should the startAt -=2;be changed to startAt -=1;.I think the reason is same to the patch. :D

blueshake:
I can confirm the issues I reported in reply 93,#99 can be fixed by ollydbg's #105 patch,even the tkTypedef can work too.

ollydbg:

--- Quote from: blueshake on October 05, 2009, 10:42:07 am ---I can confirm the issues I reported in reply 93,#99 can be fixed by ollydbg's #105 patch,even the tkTypedef can work too.

--- End quote ---
I'm so grad to hear that!!!! :lol:

mmkider:
Hi
I found a issue.

if stest is a struct;

stest->b. ;   //this is fail. Tip window can't pop up c
stest.b.c  ;  //this  is ok .

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version