diff --git a/pages.nl/common/gdb.md b/pages.nl/common/gdb.md new file mode 100644 index 0000000000..b8c84108d0 --- /dev/null +++ b/pages.nl/common/gdb.md @@ -0,0 +1,28 @@ +# gdb + +> De GNU Debugger. +> Meer informatie: . + +- Debug een uitvoerbaar bestand: + +`gdb {{pad/naar/uitvoerbaar_bestand}}` + +- Koppel een proces aan `gdb`: + +`gdb {{[-p|--pid]}} {{procID}}` + +- Debug met een core-bestand: + +`gdb {{[-c|--core]}} {{pad/naar/core}} {{pad/naar/uitvoerbaar_bestand}}` + +- Voer een bepaald GDB-commando uit bij het starten: + +`gdb {{[-ex|--eval-command]}} "{{commando's}}" {{pad/naar/uitvoerbaar_bestand}}` + +- Start `gdb` en geef argumenten mee aan het uitvoerbaar bestand: + +`gdb --args {{pad/naar/uitvoerbaar_bestand}} {{argument1 argument2 ...}}` + +- Sla `debuginfod`- en paginationprompts over en toon de backtrace: + +`gdb {{[-c|--core]}} {{pad/naar/core}} {{pad/naar/uitvoerbaar_bestand}} -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt` diff --git a/pages/common/gdb.md b/pages/common/gdb.md index 12381cac4c..e12bfb604a 100644 --- a/pages/common/gdb.md +++ b/pages/common/gdb.md @@ -5,24 +5,24 @@ - Debug an executable: -`gdb {{executable}}` +`gdb {{path/to/executable}}` -- Attach a process to gdb: +- Attach a process to `gdb`: `gdb {{[-p|--pid]}} {{procID}}` - Debug with a core file: -`gdb {{[-c|--core]}} {{core}} {{executable}}` +`gdb {{[-c|--core]}} {{path/to/core}} {{path/to/executable}}` - Execute given GDB commands upon start: -`gdb {{[-ex|--eval-command]}} "{{commands}}" {{executable}}` +`gdb {{[-ex|--eval-command]}} "{{commands}}" {{path/to/executable}}` - Start `gdb` and pass arguments to the executable: -`gdb --args {{executable}} {{argument1}} {{argument2}}` +`gdb --args {{path/to/executable}} {{argument1 argument2 ...}}` -- Skip debuginfod and pagination prompts and then print the backtrace: +- Skip `debuginfod` and pagination prompts and then print the backtrace: -`gdb {{[-c|--core]}} {{core}} {{executable}} -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt` +`gdb {{[-c|--core]}} {{path/to/core}} {{path/to/executable}} -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt`