My Code Helper
JavaScript
Python
Java
C#
C++
Ruby
Swift
Kotlin
TypeScript
Go
Rust
PHP
C
Objective-C
Dart
Scala
Perl
Lua
Haskell
R
MATLAB
VBA
F#
Groovy
Clojure
Elixir
Julia
CoffeeScript
Crystal
COBOL
Fortran
Ada
PL/SQL
T-SQL
Assembly
Shell Scripting
PowerShell
Bash
Racket
Scheme
Prolog
Erlang
Lisp
APL
Haxe
Pascal
Ada
Logo
Tcl
D
Nim
Io
ABAP
Scheme
FORTRAN
APL
COBOL
ALGOL
BASIC
PL/I
Lisp
Cobol
Forth
Ada
C
C++
Java
Python
JavaScript
Ruby
PHP
Swift
Kotlin
Go
Rust
Perl
Scala
Haskell
R
MATLAB
VBA
Objective-C
Dart
Lua
Elixir
Julia
CoffeeScript
Crystal
Groovy
Clojure
TypeScript
PowerShell
Shell Scripting
c
unix
gdb
debugging
dbx
Most tricky/useful commands for gdb debugger
Can you post your most tricky and useful commands while you run a debugger like gdb or dbx.
Solution
backtrace full
: Complete backtrace with local variables
up
,
down
,
frame
: Move through frames
watch
: Suspend the process when a certain condition is met
set print pretty on
: Prints out prettily formatted C source code
set logging on
: Log debugging session to show to others for support
set print array on
: Pretty array printing
finish
: Continue till end of function
enable
and
disable
: Enable/disable breakpoints
tbreak
: Break once, and then remove the breakpoint
where
: Line number currently being executed
info locals
: View all local variables
info args
: View all function arguments
list
: view source
rbreak
: break on function matching regular expression
clear buffer cache on Mac OS X
Why does a global statically initialized variable have a different value when debugging? / Why is my debugger loading different code to my device?
Is void a data type in C?
Given an array return any index on which its dominator occurs
Getting the "real" parent process in case process spawned indirectly using launchd
How do I convert an X11 keycode to a Unicode character in C?
Getting inflated results when trying to find newline '\n' in a char array in C
How to calculate a SHA-512 hash in C++ on Linux?
Coding a website in C?
.exe file is not being created in Windows for C by cmd by GCC compiler
How can I simulate an EOF?
gcc-arm-none-eabi 11.3 "is not implemented and will always fail"
What is this #ifdef __GNUC__ about?
OS-9 Programming in C
File Rename Function on Microware OS-9
How to convert from UTC to local time in C?
Why is the tm_year member in struct tm relative to 1900 rather than 1970 in C on macosx?
Grading system by using switch statement
Can someone explain to me this piece of code? (pointer arithmetics with masks)
Avoid trailing zeroes with printf()
Too many fonts when enumerating with EnumFontFamiliesEx function
What causes the "identifier NULL is undefined" error?
What is the full "for" loop syntax in C?
Fatal error 'stdio.h' not found
Is it safe to cast size_t to unsigned long int?
Reproducing buffer overflow
Simpler way of sorting three numbers
If I don't specify srand(), what seed does rand() use?
Computing 2¹²⁸ % uint64_t
How can I use atomic variables in C?