Last active
November 12, 2025 08:47
-
-
Save wader/cf0ed0d522fadea034ac6fdba9a5dc87 to your computer and use it in GitHub Desktop.
C dev
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
| IndentWidth: 4 |
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
| CompileFlags: | |
| Add: | |
| - "-I/Users/wader/src/FFmpeg" | |
| - "-I/opt/homebrew/Cellar/protobuf-c/1.5.2_5/include" | |
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
| { | |
| "printf ": { | |
| "prefix": "pf", | |
| "body": " printf(\"${1:format}\\\\n\");$0" | |
| }, | |
| "fprintf stderr ": { | |
| "prefix": "pfe", | |
| "body": " fprintf(stderr, \"${1:format}\\\\n\");$0" | |
| }, | |
| "av_log": { | |
| "prefix": "al", | |
| "body": "av_log(NULL, AV_LOG_DEBUG, \"${1:format}\\\\n\");$0", | |
| }, | |
| "dump_struct": { | |
| "prefix": "ds", | |
| "body": "__builtin_dump_struct($1, &printf);$0", | |
| } | |
| } |
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
| valgrind --leak-check=full ./main |
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
| # also -fsanitize=memory -fsanitize-memory-track-origins | |
| # also -fsanitize=undefined | |
| CFLAGS="-Wall -fsanitize=address -fsanitize-address-use-after-return=always -fno-omit-frame-pointer -O0 -ggdb" LDFLAGS="-fsanitize=address" ./configure |
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
| # add -ex bt -ex l etc to auto print backtrace list code etc | |
| gdb -ex="set confirm off" -ex=r --args ./prog args ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment