Here's a practical, minimal guide for using GDB in Ubuntu terminal — from launching to setting breakpoints and navigating your code. 🧰 Step 1: Compile with Debug Symbols Use -g and disable optimizations ( -O0 preferred for debugging): bash Copy Edit g++ -g -O0 -o myprog myprog.cpp 🚀 Step 2: Launch GDB bash Copy Edit gdb ./myprog You'll see a (gdb) prompt. 🎯 Step 3: Set Breakpoints You can set breakpoints in three main ways : ✅ a. At a function gdb Copy Edit (gdb) break main ✅ b. At a specific file and line gdb Copy Edit (gdb) break myprog.cpp:42 ✅ c. At a method in a class gdb Copy Edit (gdb) break MyClass::doSomething If the symbol is mangled (C++), GDB usually demangles automatically, especially if compiled with -g . ▶️ Step 4: Run the Program gdb Copy Edit (gdb) run 🧠Step 5: Navigate Command Meaning next or n Step over current line step or s Step into function call finish Run until current function returns continue or c Continue until...
There are a few ways to reuse the hot air from a split AC outdoor unit. Use it to heat water. You can use the hot air to heat water for your home or business. This can save you money on your energy bill, and it's also a more environmentally friendly way to heat water. Use it to grow plants. The hot air can be used to grow plants in a greenhouse or other enclosed space. This can help to extend the growing season and improve the yield of your plants. Use it to dry clothes. The hot air can be used to dry clothes in a dryer or on a clothesline. This can save you time and energy, and it can also help to reduce the amount of moisture in the air, which can help to prevent mold and mildew. Use it to heat a swimming pool. The hot air can be used to heat a swimming pool. This can save you money on your energy bill, and it can also help to extend the swimming season. If you're interested in reusing the hot air from your split AC outdoor unit, there are a few things you'll n...