Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Debugger/CPU    [ Add a report in this area ]  
Report #:  105857   Status: Closed
Wrong assembly listing shown if Generics is added to uses
Project:  Delphi Build #:  15.0.3953.35171
Version:    15.1 Submitted By:   Daniel Frimerman
Report Type:  Minor failure / Design problem Date Reported:  5/24/2012 1:49:56 AM
Severity:    Infrequently encountered problem Last Updated: 5/31/2012 4:07:26 PM
Platform:    All versions Internal Tracking #:  
Resolution: Cannot Reproduce (Resolution Comments) Resolved in Build: : XE2
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
I have 2 dummy projects, one has "Generics.Collections" in its uses, another has nothing in its uses, and when I trace through the functions, and look in the CPU window, some function calls are renamed to "Generics + $441358" instead of being called by the name of my functions.
Steps to Reproduce:
Look in the attached ZIP.
To see the problem, put a breakpoint on "Test;" in the DPR file (line 98).
When breakpoint occurs, look in the CPU Window.

Variant1 Project (with Generics.Collections in uses) says this:

Project1.dpr.98: Test;
00444324 E84BD0FFFF       call Generics + $441374

Whereas Variant2 Project (with no uses section) says this:
Project1.dpr.96: Test;
004050C4 E867F5FFFF       call Test

Other differences, Variant1:
Project1.dpr.90: begin
00404630 53               push ebx
Project1.dpr.91: for I:=1 to 10 do
00404631 BB01000000       mov ebx,$00000001
Project1.dpr.92: WriteInt(I);
00404636 8BC3             mov eax,ebx
00404638 E8D7FFFFFF       call WriteInt
0040463D 43               inc ebx
Project1.dpr.91: for I:=1 to 10 do
0040463E 83FB0B           cmp ebx,$0b
00404641 75F3             jnz $00404636
Project1.dpr.93: end;
00404643 5B               pop ebx
00404644 C3               ret

Variant2:
Project1.dpr.92: begin
00441374 53               push ebx
Project1.dpr.93: for I:=1 to 10 do
00441375 BB01000000       mov ebx,$00000001
Project1.dpr.94: WriteInt(I);
0044137A 8BC3             mov eax,ebx
0044137C E8D7FFFFFF       call Generics + $441358
00441381 43               inc ebx
Project1.dpr.93: for I:=1 to 10 do
00441382 83FB0B           cmp ebx,$0b
00441385 75F3             jnz $0044137a
Project1.dpr.95: end;
00441387 5B               pop ebx
00441388 C3               ret
Workarounds
N/A.
Attachment
105857.zip
Comments

Daniel Frimerman at 5/30/2012 2:23:23 AM -
Fixed in XE2 Update 4, 16.0.4504.48759

Tomohiro Takahashi at 5/30/2012 4:37:57 AM -
Thanks for the confirmation. I will check this issue with XE and XE2.

Server Response from: ETNACODE01