All Projects → andyneff → hello-world-gdb

andyneff / hello-world-gdb

Licence: other
Simple hello world program for debugging with gdb

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to hello-world-gdb

Dlangide
D language IDE based on DlangUI
Stars: ✭ 358 (+1134.48%)
Mutual labels:  debugger, gdb
Rr
Record and Replay Framework
Stars: ✭ 6,469 (+22206.9%)
Mutual labels:  debugger, gdb
Lldb
Project moved to: https://github.com/llvm/llvm-project
Stars: ✭ 412 (+1320.69%)
Mutual labels:  debugger, gdb
madbomber
Backtrace-on-throw C++ exception logger
Stars: ✭ 17 (-41.38%)
Mutual labels:  debugger, gdb
Pyvmidbg
LibVMI-based debug server, implemented in Python. Building a guest aware, stealth and agentless full-system debugger
Stars: ✭ 192 (+562.07%)
Mutual labels:  debugger, gdb
gdbstub
An ergonomic and easy-to-integrate implementation of the GDB Remote Serial Protocol in Rust, with full no_std support.
Stars: ✭ 158 (+444.83%)
Mutual labels:  debugger, gdb
esp-gdbstub
ESP8266 debugging tool
Stars: ✭ 13 (-55.17%)
Mutual labels:  debugger, gdb
kakoune-gdb
gdb integration plugin
Stars: ✭ 44 (+51.72%)
Mutual labels:  debugger, gdb
Angrgdb
Use angr inside GDB. Create an angr state from the current debugger state.
Stars: ✭ 165 (+468.97%)
Mutual labels:  debugger, gdb
Gdb Frontend
☕ GDBFrontend is an easy, flexible and extensionable gui debugger.
Stars: ✭ 2,104 (+7155.17%)
Mutual labels:  debugger, gdb
metal.test
Deprecated, superseded by https://github.com/metal-ci/test
Stars: ✭ 41 (+41.38%)
Mutual labels:  debugger, gdb
Gdbghidra
gdbghidra - a visual bridge between a GDB session and GHIDRA
Stars: ✭ 251 (+765.52%)
Mutual labels:  debugger, gdb
lldbg
A lightweight native GUI for LLDB.
Stars: ✭ 83 (+186.21%)
Mutual labels:  debugger, gdb
insight
A Tcl/Tk Frontend for GDB. This is an AppImage(Portable Package) of insight for the sake of Jeff Duntemann's amazing book.
Stars: ✭ 31 (+6.9%)
Mutual labels:  debugger, gdb
gdb-dashboard
Modular visual interface for GDB in Python
Stars: ✭ 8,699 (+29896.55%)
Mutual labels:  debugger, gdb
Voltron
A hacky debugger UI for hackers
Stars: ✭ 5,599 (+19206.9%)
Mutual labels:  debugger, gdb
vim-easydebugger
A VIM multi-language debugger plugin
Stars: ✭ 47 (+62.07%)
Mutual labels:  debugger, gdb
gdb
Go GDB/MI interface
Stars: ✭ 70 (+141.38%)
Mutual labels:  debugger, gdb
Gdbgui
Browser-based frontend to gdb (gnu debugger). Add breakpoints, view the stack, visualize data structures, and more in C, C++, Go, Rust, and Fortran. Run gdbgui from the terminal and a new tab will open in your browser.
Stars: ✭ 8,339 (+28655.17%)
Mutual labels:  debugger, gdb
Code Debug
Native debugging for VSCode
Stars: ✭ 232 (+700%)
Mutual labels:  debugger, gdb

Simple counter program to demonstrate gdb on

Running the docker

git clone [email protected]:andyneff/hello-world-gdb.git .
docker run -it --rm --privileged -v `pwd`:/src:ro --name hello_gdb andyneff/hello-world-gdb

Attach with your favorite debugger using docker exec -i {container name} as a wrapper or docker exec -i {container name} sh -c if the debugger send multiple arguments as one argument.

Launch Debugging

Most debuggers are not going to support this gracefully, so the simplest thing to do is to start the docker yourself, and compile the binary, and then launch via docker exec

docker run -it --rm --privileged -v `pwd`:/src:ro --name hello_gdb andyneff/hello-world-gdb sh
gcc /src/hello.cpp -o /hello.out

Launch with your favorite debugger.

Why --privileged?

gdb needs ptrace permissions. Getting these in a docker varies from OS to OS. The easiest thing to do is just give it all permissions. However, if you want the most secure option, you need to figure out what is right for your operating systems, for example, on Ubuntu with apparmor you need:

  • --security-opt=seccomp:unconfined : needed for --attach pid#
  • --security-opt apparmor:unconfined : needed for --multi (not currently used)
  • --cap-add SYS_PTRACE : needed for ptrace
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].