Skip to content

Instantly share code, notes, and snippets.

@ahillo
ahillo / llvm+mingw+gdb.md
Last active September 9, 2022 12:59
Using LLVM+MinGW to compile LLVM IR to an exe on Windows, with gdb-compatible debug symbols

Pseudo-C file (03.cpp)

int main(int argc, const char *argv[]) {
	print("hello 123 world");
	print("hello 123 world");
	print("hello 123 world");
	return 0;	
}
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@ahillo
ahillo / How to profile release build in VS
Last active August 29, 2015 14:16
How to profile release build in VS
How to profile release build in VS
----
1. (In VS:) select release build config
2. Right click the target Project -> properties -> configuration properties -> linker -> debugging -> set 'Generate debug info' to 'Optimize for debugging'
3. Add the following option to Configuration properties -> C/C++ -> Command line: /d2Zi+
3. Build in release
2. Analyze -> profiler -> new performance session (this only needs to be done once)
4. Ctrl+F5 to run the project
5. Right click on the created session on performance explorer -> attach to process -> 'your process'