Skip to main content

Posts

Showing posts from August, 2020

How to use gdb in Ubuntu Terminal

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...

How to make Eggless Chocolate Cake in Home in microwave

  Ingredients: 1> 1 glass wheat floor 2> 2 tbs sooji 3> 3 tbs coca powder 4> 1 tbs baking powder 5> 0.25 tbs baking soda 6> 0.75 glass sugar 7> 2 spoon refined oil 8> 1pc leamon 9> 1 tbs vanila essence Procedure to prepare cake: I> Prepration of dry mixture 1> Sheve (chal le chalni se) Wheat floor, coca powder, baking powder, sooji and keep the mixture in dry vessel. II> Prepration of fluid: 1> Powder sugar in mixi 2> In a pot add milk, powdered sugar, refine oil and mix them well. III> Greese microwave pot with oil and kept asside IV> Mixing dry mixture and fluid, and setting it to microwave pot and keeping in microwave: 1> To the fluid pot, add dry mixture and mix them well so that there is no lumps 2> If you want mix them in Mixi Jar to form a smooth paste 3> To that paste, add vanila essence, lemon and mix well 4> Add baking soda and mix well and quickly pour mixture in microwave pot 5> Then by hammering microwave p...