Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
clang-cl-x64.log
C:\projects\c\poc
λ clang-x64.bat
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.2
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\projects\c\poc
λ clang-cl -v
clang version 8.0.0 (tags/RELEASE_800/final)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: D:\dev\LLVM\x64\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' (x86_64).
(lldb) break set -f main.c -l 13
Breakpoint 1: where = main.exe`main + 135 at main.c:13, address = 0x0000000140006c47
(lldb) run
Process 8032 launched: 'C:\projects\c\poc\main.exe' (x86_64)
Process 8032 stopped
* thread #1, stop reason = breakpoint 1.1
frame #0: 0x00007ff623656c47 main.exe`main(argc=1, argv=0x00000208a998d6c0) 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 = 60
(lldb) p d
(double) $1 = 1.3999999999999999
(lldb) p ret
(int) $2 = 84
(lldb) c
Process 8032 resuming
Process 8032 exited with status = 84 (0x00000054)
(lldb) quit
// Console's 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.