Skip to content
0:00 / 0:00

#gdb#debugging#c

GDB is REALLY easy! Find Bugs in Your Code with Only A Few Commands

Low Level

1.2M subscribers • 7 videos on Hallway

YouTube
  • Recommended by 3 people: 3 in engineering communities.

Beginner. No background in the topic needed.

369K views5 years ago3 recommendations

Tools and practiceSystems programmingDebuggingCThe shell and command line

An introduction to debugging C programs using basic GDB commands, breakpoints, and stepping.

Join me and learn how to debug a program written in C using GDB. In this video, we go over how to compile a program written in C so that GDB can present it, as well as the basic commands used in GDB to debug a program. Like and subscribe for more videos like this! 🏫 COURSES 🏫 Learn to code in C at lowlevel.academy 🔥 SOCIALS 🔥 Low Level Merch!: linktr.ee/lowlevellearning Follow me on Twitter: twitter.com/LowLevelTweets Follow me on Twitch: twitch.tv/lowlevellearning Join me on Discord!: discord.gg/gZhRXDdBYY Timestamps Intro Compiling Code for GDB Starting GDB Breakpoints C Step vs ASM Step Step Over vs Step In Finding the Bug Outro

Why it's here

3 people recommend this

What people say. Recommended as a simple and easy-to-follow tutorial for beginners learning how to use GDB.

u/OstrichWestern639in r/osdev • Recommends

On “osdev debugging”

General GDB info: link to this video Debugging linux kernel: link to this video I know you are asking for your own kernel and not linux. But the principles remain the same. Make sure you compile your OS with -g option to include debugging symbols. Once you compile it, run: gdb ./path-to-kernel-object-file -ex “target remote localhost:1234” This should connect you with your kernel. Add break points and run. (Look at GDB tutorial) The way you can debug faults is kinda tricky… you can code your kernel in a way to enter panic() when such things happen. Breakpoint at panic() and backtrace. But there are other methods too, like manually checking where the faults happening. Ill let others explain this part:)

u/djkstr27in r/C_Programming • Recommends

On “Having difficulties with A modern approach projects”

It is ok, GDB stands for Gnu Debugger, a debugger is a tool that allows you to go step by step in your code. To check errors, that causes your code to fail. link to this video link to this video

u/Dry-Pea-181in r/programming • Recommends

On “Vim is Better - Here's Why (beginners introduction to Neovim as an IDE)”

link to this video