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...
Query: Jamun: precautions after n before eating ChatGPT said: Here are scientifically backed precautions and considerations before and after eating jamun (Java plum / Syzygium cumini) : ✅ Before Eating Jamun 1. Wash Thoroughly Why: To remove surface dirt, pesticide residues, or microbial contamination. How: Wash under running water or soak in salt water for a few minutes. 2. Check Ripeness Eat only ripe, purple-black jamuns . Raw/unripe fruits can cause throat irritation or stomach upset. 3. Avoid If You Have Certain Conditions Low Blood Sugar (Hypoglycemia): Jamun lowers blood sugar, so avoid or use cautiously if you're already taking antidiabetic meds or have low sugar. Allergy risk: Rare, but check for allergy to Syzygium species. ✅ While Eating 4. Do Not Eat Seeds (Raw) Seeds are medicinal , but raw seeds may not be digestible and should not be chewed or swallowed whole. If used, seed powder (dry, powdered form) is safer and more bioa...