Basic ideas - kuotsanhsu/ccc GitHub Wiki
Write the libraries and executables in C, but test in C++.
- https://github.com/torvalds/linux/blob/master/.clang-format
- https://clang.llvm.org/docs/ClangFormatStyleOptions.html#examples
- https://www.cmcrossroads.com/article/basics-vpath-and-vpath
-
Environment variables
- use
makefile.preConfigureScript
- use
- https://devblogs.microsoft.com/cppblog/makefile-tools-december-2021-update-problem-matchers-and-compilation-database-generation/#generate-compile_commands.json
- How to get accurate diagnostics when viewing files included from external libraries?
- Add separate setting to set --compile-commands-dir
- clangd cannot figure C++ standard in STL headers in VS Code
- How do I fix errors I get when opening headers outside of my project directory?
- Header extension .h interpreted as C
- Source file chosen to infer compile commands for a header sometimes has the wrong language
- https://www.gnu.org/software/c-intro-and-ref/manual/html_node/Unicode-Character-Codes.html
- https://en.cppreference.com/w/c/string/multibyte.html
- https://www.gnu.org/software/gnulib/manual/html_node/The-char32_005ft-type.html
- https://www.gnu.org/software/gnulib/manual/html_node/uchar_002eh.html
- https://en.cppreference.com/w/c/language/string_literal.html
- https://encoding.spec.whatwg.org/#utf-8
- U+FFFD Substitution of Maximal Subparts
- Conformance clause C10
- https://www.appspector.com/blog/core-dump
- https://www.baeldung.com/linux/managing-core-dumps
- https://github.com/vadimcn/codelldb/issues/24#issuecomment-287409381
- http://jackywoo.cn/analyze-core-dump-with-lldb-en/
- https://zed.dev/docs/development/debugging-crashes
-
https://nullprogram.com/blog/2022/06/26/
- __builtin_trap
- __builtin_debugtrap
- https://werat.dev/blog/debugging-lldb-with-source-stepping/
- https://stackoverflow.com/a/74882522/16371358
- https://reverse.put.as/2019/11/19/how-to-make-lldb-a-real-debugger/
- https://clang.llvm.org/docs/analyzer/user-docs/Annotations.html
~/Library/Logs/DiagnosticReports
lldb -c ~/Library/Logs/DiagnosticReports/test_unicode-2025-05-31-162110.ips
# Unknown core file format '/Users/gordonh/Library/Logs/DiagnosticReports/test_unicode-2025-05-31-162110.ips'
open ~/Library/Logs/DiagnosticReports/test_unicode-2025-05-31-162110.ips
cd json
lldb test_unicode ## Listing: lldb session
(lldb) target create "test_unicode"
Current executable set to '/Users/gordonh/Documents/ccc/json/test_unicode' (arm64).
(lldb) r
Process 14973 launched: '/Users/gordonh/Documents/ccc/json/test_unicode' (arm64)
Assertion failed: (c == code_points[i]), function main, file test_unicode.c, line 27.
Process 14973 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
frame #4: 0x00000001000005b8 test_unicode`main + 264
test_unicode`main:
-> 0x1000005b8 <+264>: b 0x1000005bc ; <+268>
0x1000005bc <+268>: b 0x1000005c0 ; <+272>
0x1000005c0 <+272>: ldr x8, [sp, #0x8]
0x1000005c4 <+276>: add x8, x8, #0x1
Target 0: (test_unicode) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
frame #0: 0x000000018d8cd388 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x000000018d90688c libsystem_pthread.dylib`pthread_kill + 296
frame #2: 0x000000018d80fc60 libsystem_c.dylib`abort + 124
frame #3: 0x000000018d80eeec libsystem_c.dylib`__assert_rtn + 284
* frame #4: 0x00000001000005b8 test_unicode`main + 264
frame #5: 0x000000018d566b98 dyld`start + 6076
(lldb)
- https://github.com/redhat-developer/vscode-yaml?tab=readme-ov-file#associating-a-schema-in-the-yaml-file
- https://json-schema-everywhere.github.io/
- 2025 EuroLLVM - What is LLDB-DAP?
- User settings:
"lldb-dap.executable-path": "/Library/Developer/CommandLineTools/usr/bin/lldb-dap"
xcrun -f lldb-dap
- Debugging Wine with LLDB and VSCode
- How to concisely express the C++20 concept of range containing T-typed values?
- Use std::span or std::ranges::contiguous_range when wrapping C arrays in C++?
__assert_fail
#define assert(c) while (!(c)) __builtin_unreachable()
- https://www.reddit.com/r/cpp_questions/comments/1k0pwi6/what_is_stacktrace_used_for/
- https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/time-travel-debugging-walkthrough
-
Show HN: Using C++23
<stacktrace>
to get proper crash logs in C++ programs-
https://news.ycombinator.com/item?id=36608212
IMHO, the printf-style API is superior to the stream based API, because it can be adapted into a logging API that defers string formatting or delegates it to another thread.
- patching LLVM's libunwind
-
https://news.ycombinator.com/item?id=36608212