Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
clang-cl-x86.log
C:\projects\c\poc
λ clang-x86.bat
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.2
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'
C:\projects\c\poc
λ clang-cl -v
clang version 8.0.0 (tags/RELEASE_800/final)
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: D:\dev\LLVM\x86\bin
C:\projects\c\poc
λ clang-cl /Zi /Od main.c
C:\projects\c\poc
λ lldb main.exe
(lldb) target create "main.exe"
Current executable set to 'main.exe' (i686).
(lldb) break set -f main.c -l 13
Breakpoint 1: where = main.exe`_main + 154 at main.c:13, address = 0x00406cca
(lldb) run
Process 17936 launched: 'C:\projects\c\poc\main.exe' (i686)
Process 17936 stopped
* thread #1, stop reason = breakpoint 1.1
frame #0: 0x00c76cca main.exe`_main(argc=1, argv=0x001cd9d0) at main.c:13
10 int ret = (size * d);
11 printf("ret=%d\n", ret);
12
-> 13 return ret;
14 }
(lldb) p size
(int) $0 = 13056645
(lldb) p d
(double) $1 = 1.2732621032865333E-312
(lldb) p ret
(int) $2 = 1073112678
(lldb) c
Process 17936 resuming
Process 17936 exited with status = 84 (0x00000054)
(lldb) quit
// Console's actual output for this scenario is:
// size=60
// double=1.400000
// ret=84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.