Copy of base method in derived class tricks debuger
I have classes A and B, B derived from A, A has method Abc.
From INT of class B I see that compiler copies implementation of Abc to class B, so that Abc exists both in A and B.
As result, when B invokes Abs, B.Abs() is executed instead of A.Abs(). In result debuger is not able to step into Abs and breakpoints in A.Abs never hit.
Why this happens and how can I avoid this?
OK, now I know the reason: compiler makes the copy if Abc has this line:
hmmmm... compiler needs name of method's class so it "moves" the method to child class. Well, perhaps there is a good reason for that but for the moment the solution looks strange.
I need classname (and %methodname) to provide location to my macro throwing exception in certain conditions. Seems I have to drop that unless someone knows a way how to avoid the copying in this case.