
Debug a Running Process by Attaching With gdb -p
Attach GDB to a process that is already running with gdb -p or attach, inspect where it is stuck, then detach so it keeps running. Covers permissions.
Tag
445 posts

Attach GDB to a process that is already running with gdb -p or attach, inspect where it is stuck, then detach so it keeps running. Covers permissions.

Point DL_DIR and SSTATE_DIR at directories outside any build tree and every Yocto build on the machine reuses the same downloads and cached task output.

Load and store bytes, words, dwords and qwords on x86-64 with MOV, and widen small values correctly with MOVZX, MOVSX and MOVSXD. Worked examples included.

What a Windows HANDLE is, how the per-process handle table refers to kernel objects, how handles are closed, duplicated and inherited, and how to spot leaks.

Configure ESP32 outputs and a button input with gpio_config in ESP-IDF 5.x, then add a falling-edge interrupt with gpio_install_isr_service and a queue.

Create a command pool, record a vkCmdFillBuffer into a command buffer, submit it with a fence, and read the result back from host-visible memory in C++.

Learn what a bit, nibble, byte, word and doubleword are, why a word has no single size, and how C reports the real sizes of its types on your platform.

Avoid lock-ordering deadlocks in C++17 and C++20 by locking several mutexes at once with std::scoped_lock, with a bank transfer example and the pitfalls.

Stop only when it matters. Set a condition with break ... if, change it with condition, skip hits with ignore, and learn what conditions cost on hot paths.

MACHINE picks the hardware, DISTRO picks the policy and the image recipe picks the contents. Here is how to choose and change each one.

Learn the x86-64 memory operand form [base + index*scale + displacement], what each part may be, which combinations are illegal, and how arrays map onto it.

Wire a button to a Raspberry Pi Pico, enable the pull-up with gpio_pull_up and read it with gpio_get in C using Pico SDK 2.0, with CMake and expected output.