Created
November 19, 2014 19:26
-
-
Save robert-nix/ca79fe6aead62dfc2e4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Listing generated by Microsoft (R) Optimizing Compiler Version 18.00.30501.0 | |
| TITLE D:\dev\PdbStaticTest\PdbStaticTest\unit1.cpp | |
| .686P | |
| .XMM | |
| include listing.inc | |
| .model flat | |
| INCLUDELIB LIBCMT | |
| INCLUDELIB OLDNAMES | |
| CONST SEGMENT | |
| $SG3939 DB 'test = %lx', 0aH, 00H | |
| $SG3940 DB 'unit1.OneName = %lx', 0aH, 00H | |
| ORG $+3 | |
| $SG3941 DB 'extern unit0.OneName = %lx', 0aH, 00H | |
| CONST ENDS | |
| _DATA SEGMENT | |
| _OneName DD 011d7H | |
| _OneName DD 04d2H | |
| _DATA ENDS | |
| PUBLIC ?doSomething@@YAXXZ ; doSomething | |
| EXTRN _printf:PROC | |
| EXTRN __alloca_probe:PROC | |
| ; Function compile flags: /Ogtp | |
| ; File d:\dev\pdbstatictest\pdbstatictest\unit1.cpp | |
| _TEXT SEGMENT | |
| ?doSomething@@YAXXZ PROC ; doSomething | |
| ; 12 : void doSomething() { | |
| 00000 55 push ebp | |
| 00001 8b ec mov ebp, esp | |
| ; 13 : uintptr_t test = (uintptr_t)_alloca(0x10); | |
| 00003 b8 10 00 00 00 mov eax, 16 ; 00000010H | |
| 00008 e8 00 00 00 00 call __alloca_probe | |
| ; 14 : printf("test = %" PRIxPTR "\n", test); | |
| 0000d 54 push esp | |
| 0000e 68 00 00 00 00 push OFFSET $SG3939 | |
| 00013 e8 00 00 00 00 call _printf | |
| ; 15 : printf("unit1.OneName = %" PRIxPTR "\n", &X::OneName); | |
| 00018 68 00 00 00 00 push OFFSET _OneName | |
| 0001d 68 00 00 00 00 push OFFSET $SG3940 | |
| 00022 e8 00 00 00 00 call _printf | |
| ; 16 : printf("extern unit0.OneName = %" PRIxPTR "\n", &OneName); | |
| 00027 68 00 00 00 00 push OFFSET _OneName | |
| 0002c 68 00 00 00 00 push OFFSET $SG3941 | |
| 00031 e8 00 00 00 00 call _printf | |
| 00036 83 c4 18 add esp, 24 ; 00000018H | |
| ; 17 : } | |
| 00039 8b e5 mov esp, ebp | |
| 0003b 5d pop ebp | |
| 0003c c3 ret 0 | |
| ?doSomething@@YAXXZ ENDP ; doSomething | |
| _TEXT ENDS | |
| END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment