« Reply #17 on: May 03, 2011, 10:21:52 am »
Here is my code test:
void MyFunction(int paraA, float paramB)
{
for(int index = 0; Foo* foofoo = Something.getFooByIndex(index); ++index)
{
// let's do something with foofoo
foofoo->DoSomething();
int i;
i++;
}
//type + variable
for(int a=0;a<10;a++)
{
int i;
i++;
};
for(NS::MyClass a=0;a<100;a++)
{
int i;
i++;
};
// type containing some template info
for(MyNameSpace::MyTempLateClass<X,Y> a=0;a.DoSomething>b;a++)
a++;
// pointer declaration
for(int *a=0;a<0x4444;a = a+4)
;
for(int **a=0;a<0x4444;a = a+4)
;
// two variables
for(int *a=0, b=0;...)
;
}
and here is the result:
function MyFunction 1:6
for 3:5
variable index 3:13
variable foofoo 3:29
variable i 7:12
for 12:5
variable a 12:13
variable i 14:12
for 18:5
variable a 18:21
variable i 20:12
for 25:5
variable a 25:43
for 29:5
variable a 29:14
for 31:5
variable a 31:15
for 35:5
variable a 35:14
the xxx:xxx showing a symbol position by line:column.
But I think my parser is still not mature.
, it need a long time and long way to go
« Last Edit: May 03, 2011, 10:47:12 am by ollydbg »
Logged
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.