Debugging C Programs with GDB

  Рет қаралды 48,737

NeuralNine

NeuralNine

Күн бұрын

Пікірлер: 129
@tibish
@tibish 2 жыл бұрын
This helps me as I’m learning C for my university degree. Much appreciated. Keep up the great work 🤗
@kid-presentable
@kid-presentable 8 ай бұрын
Just finished an Operating Systems class and was talking with my brother in law about how hard it is to debug C with just printfs, and he was confused I wasn't using GDB. My teacher never taught us it existed. I'm so mad
@thechronicler7461
@thechronicler7461 8 ай бұрын
Never have I imagined one day I'd be debugging with minimal UI like this. Thx for the vid.
@michaelhex
@michaelhex 2 ай бұрын
I have been programming in C for 40 years and the only command I know in gdb is "where", once I see the stack trace I usually know where the issue is. The best tool for debugging C is your brain.
@NeuralNine
@NeuralNine 2 ай бұрын
Agree!
@Joao-oo8yj
@Joao-oo8yj 14 күн бұрын
"The best tool for debugging C is your brain" -- John Carmack wouldn't agree with that statement.
@michaelhex
@michaelhex 14 күн бұрын
@@Joao-oo8yj Each to his own. It works for me, never had any problems debugging code for over 40 years.
@edwardmacnab354
@edwardmacnab354 Жыл бұрын
at 9:14 , it is an unfortunate choice to have your file named main.c because if the file were called hello.c for example you would also use >disassemble main and not >disassemble hello because there is an inherent assumption in the way you presented it !
@davidho1258
@davidho1258 2 жыл бұрын
how did you know i needed this 😇
@zeekthegeek4538
@zeekthegeek4538 11 ай бұрын
cheers mate, helped me out a ton.
@lennuard_6998
@lennuard_6998 2 жыл бұрын
would be cool if you could more in depth with C
@esimitley4729
@esimitley4729 6 ай бұрын
Thank you, very useful for neophyte :)
@michaelciyke
@michaelciyke Жыл бұрын
So nice a guide. Loved it! And I like your microphone. You should have skipped the part of writing the actual code since it's not the point of the guide. It is also nice that you added that skipping ability so one can just go straight to debugging. Still some users will miss the video because of the length not knowing it is in fact organized in chapters. I'm speaking of those who need just a focused video on debugging.
@johnwight6041
@johnwight6041 3 ай бұрын
What is the nv command do? Is that a text editor like vim or nano? Not familiar
@Wutheheooooo
@Wutheheooooo 3 ай бұрын
neovim, likely an alias for nvim, not actual name in the bin I think.
@smashy152
@smashy152 Жыл бұрын
Is it possible to have gdb display all relevant variables to the current scope(or global and local) and update them with each step like vscode does? or do you have to type print for each variable every step?
@Kapkar
@Kapkar 10 ай бұрын
Do we need GDB ? Visual studio code has good debugging system with breakpoints that you mentioned for Pyhton. So should we use VSCode ?
@roymarshall_
@roymarshall_ 6 ай бұрын
Sometimes you don't have a choice
@Kapkar
@Kapkar 6 ай бұрын
@@roymarshall_ Yeah you're right mate
@salsamancer
@salsamancer 2 жыл бұрын
debugging C on your PC is one thing. The real "fun" starts when you try to debug an embedded program that you burned to an IC...
@shadowrealm8937
@shadowrealm8937 Жыл бұрын
How did you copypasted scanf lines?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
6:47 Use a pager.
@enrgpro
@enrgpro 2 жыл бұрын
Keep up the good work
@digitalrew
@digitalrew 7 ай бұрын
Cool, thanks, I love this video, I learned new good stuff! Actually I got to this video, because after several tries, I couldn't seem to make the VScode work properly... I know I'm a noob...
@nareshtechweb930
@nareshtechweb930 Жыл бұрын
what is nv IDEs ❓
@facundoguinazu3542
@facundoguinazu3542 Жыл бұрын
Does this works as well with c++?
@knowledgedose1956
@knowledgedose1956 2 жыл бұрын
cool, thank you for dedication. Do you consider making videos about Rust or Go in future?
@meshlife2346
@meshlife2346 10 ай бұрын
NICE VIDEO 😊😊
@panoskappos2735
@panoskappos2735 8 ай бұрын
what IDE is this ?
@CliffordMacpherson-l8e
@CliffordMacpherson-l8e 4 ай бұрын
Isobel Walks
@ADwaMoviesandMusicsproduction
@ADwaMoviesandMusicsproduction Жыл бұрын
not a single person shows the first step, where are you opening the file or anything like that, there is no help really for gdb beginner, how to use text editor, gnu or shell together, I never heard of gdb and everyone says you use this comman and install gdb, only minigw video, explains atleast the first part
@edwardmacnab354
@edwardmacnab354 Жыл бұрын
yes it all depends on that one rare video. For example , I couldn't compile a simple hello world and the error was that there was no stdio.h which kinda threw me . Then I read that to compile the source for glibc you needed glibc , which catch 22 threw me , then I saw this one vid that said do sudo apt install build-essentials and , lo and behold HELLO WORLD !! Weird that so much key info is squirreled away so deep .
@recklessvelociraptor2579
@recklessvelociraptor2579 Жыл бұрын
is there any good gui alternatives for gdb?
@recklessvelociraptor2579
@recklessvelociraptor2579 Жыл бұрын
I think it is uses gdb by default? So I can use all gdb commands in there? Like reverse step?@soufiane_dev
@SophyDavid-x4o
@SophyDavid-x4o 3 ай бұрын
Melvin Light
@Jonathan-ru9zl
@Jonathan-ru9zl Жыл бұрын
Hi! Why actually going that way if you have codeblocks or eclipse or other IDEs?
@AntoinetteCongreve-n3h
@AntoinetteCongreve-n3h 3 ай бұрын
Nichole Route
@NewtonAurora-q3l
@NewtonAurora-q3l 3 ай бұрын
Antonietta Summit
@ConnorDuncan-g6r
@ConnorDuncan-g6r 3 ай бұрын
Pollich Fall
@JimmyDalhover-b1q
@JimmyDalhover-b1q 3 ай бұрын
Baumbach Curve
@WalshAntonia-l8n
@WalshAntonia-l8n 3 ай бұрын
Effertz Hill
@ArchibaldAnnabelle-z3e
@ArchibaldAnnabelle-z3e 4 ай бұрын
Rickie Tunnel
@exnihilonihilfit6316
@exnihilonihilfit6316 2 жыл бұрын
6:38 My god, doesn't your console have a scrollbar?! 😂
@AndreJones-l6w
@AndreJones-l6w 3 ай бұрын
Keagan Dam
@DavidYedda-w9y
@DavidYedda-w9y 4 ай бұрын
Tromp Dam
@DeniseClark-i2x
@DeniseClark-i2x 4 ай бұрын
Hayes Gateway
@JosephineParks-x3r
@JosephineParks-x3r 4 ай бұрын
Tromp Ville
@DefoeBrian-x9m
@DefoeBrian-x9m 3 ай бұрын
Schinner Station
@DebraDebra-g2j
@DebraDebra-g2j 4 ай бұрын
Armstrong Ramp
@YunusSahin-h9j
@YunusSahin-h9j 4 ай бұрын
Elvie Crescent
@SinclairHuxley-w8j
@SinclairHuxley-w8j 4 ай бұрын
McLaughlin Shoal
@AnnJones-l3h
@AnnJones-l3h 4 ай бұрын
Conroy Station
@JaneLisa-f9w
@JaneLisa-f9w 4 ай бұрын
Chaya Way
@DianaOwen-g6d
@DianaOwen-g6d 3 ай бұрын
Heathcote Mountains
@JaredDodd-d1e
@JaredDodd-d1e 3 ай бұрын
Ferne Landing
@MichelleRobinson-o5j
@MichelleRobinson-o5j 3 ай бұрын
Rolfson Underpass
@MableCheam-p2y
@MableCheam-p2y 4 ай бұрын
Ignacio Extension
@EricaWilson-q6v
@EricaWilson-q6v 3 ай бұрын
Dayna Club
@JohnLattimore-z3l
@JohnLattimore-z3l 4 ай бұрын
Wallace Mountains
@PamelaWoods-y9d
@PamelaWoods-y9d 3 ай бұрын
Travis Ferry
@MadgeAlston-u2g
@MadgeAlston-u2g 4 ай бұрын
Roberts Radial
@BartlettJeames-u2d
@BartlettJeames-u2d 3 ай бұрын
Bergstrom Alley
@CherylRager-o4v
@CherylRager-o4v 3 ай бұрын
Margaretta Alley
@edwardmacnab354
@edwardmacnab354 Жыл бұрын
you might have said that in >nv main.c at the bash prompt nv is a custom alias that you've set up and that to terminate the shell running the c program you use ^c or ctrl + c and you probably should have cited all the documentation sites for gdb and to really scare people gcc , nano , and glibc . Actually I have learned that ^d or ctrl + d is the proper way to terminate
@BellamyDunn-o9o
@BellamyDunn-o9o 3 ай бұрын
Luella Crossroad
@WilhelminaDunn-v1h
@WilhelminaDunn-v1h 3 ай бұрын
Glennie Freeway
@ChestertonSophia-h2b
@ChestertonSophia-h2b 3 ай бұрын
Mckayla Springs
@JasperEli-w4z
@JasperEli-w4z 3 ай бұрын
Doug Freeway
@DorothyBazaldua-x2s
@DorothyBazaldua-x2s 3 ай бұрын
Roscoe Hills
@AugustineJoyce-m6i
@AugustineJoyce-m6i 3 ай бұрын
John Roads
@EricWhite-p5j
@EricWhite-p5j 3 ай бұрын
Barton Inlet
@LeonardRiley-y6z
@LeonardRiley-y6z 4 ай бұрын
Libbie Street
@WmManns-f1z
@WmManns-f1z 4 ай бұрын
Remington Stream
@SummerEtkin-x8b
@SummerEtkin-x8b 4 ай бұрын
Murazik Points
@GeraldoWright-j8f
@GeraldoWright-j8f 4 ай бұрын
Benedict Loop
@sohanpal9682
@sohanpal9682 4 ай бұрын
Flatley Flats
@VeblenDora-t7s
@VeblenDora-t7s 3 ай бұрын
Schinner Valley
@GrahamWright-t5x
@GrahamWright-t5x 3 ай бұрын
Considine Dam
@ReynoldsPatricia-p5n
@ReynoldsPatricia-p5n 4 ай бұрын
Lind Run
@VenusCarls-k8l
@VenusCarls-k8l 4 ай бұрын
Cletus Park
@DullesIngemar-u6r
@DullesIngemar-u6r 3 ай бұрын
Cole Lane
@ClementLestourgeon-c3h
@ClementLestourgeon-c3h 4 ай бұрын
Mathew Trail
@RobinHerbert-s2x
@RobinHerbert-s2x 3 ай бұрын
Emile Lakes
@AdelaIngrid-e1u
@AdelaIngrid-e1u 4 ай бұрын
Lehner Mountains
@JoeEartha-n4g
@JoeEartha-n4g 3 ай бұрын
Wendy Road
@NewtonDana-b1r
@NewtonDana-b1r 5 ай бұрын
Krajcik Grove
@RebeccaBarrett-b8q
@RebeccaBarrett-b8q 4 ай бұрын
Macejkovic Club
@piuse-q2x
@piuse-q2x 4 ай бұрын
Carleton Fort
@TressieSelf-r7x
@TressieSelf-r7x 4 ай бұрын
Reinger Circle
@BlumeDenise-x9s
@BlumeDenise-x9s 4 ай бұрын
Marquis Station
@JulianaRita-x1n
@JulianaRita-x1n 4 ай бұрын
Smitham Cove
@BobbieRigali-x1l
@BobbieRigali-x1l 4 ай бұрын
Edwina Rest
@EllenOrville-q5h
@EllenOrville-q5h 3 ай бұрын
Gusikowski Tunnel
@CookeAlexander-w4p
@CookeAlexander-w4p 3 ай бұрын
Marilou Light
@TrishMaury-q5o
@TrishMaury-q5o 4 ай бұрын
Emelia Points
@LindsayBaughman-k6x
@LindsayBaughman-k6x 4 ай бұрын
Lennie Corner
@JoelRoderick-o6y
@JoelRoderick-o6y 4 ай бұрын
Chester Vista
@RaymondEdison-c1v
@RaymondEdison-c1v 4 ай бұрын
Grant Turnpike
@LeeBennett-n8m
@LeeBennett-n8m 4 ай бұрын
Pacocha Parkways
@AliceSchwartz-o1y
@AliceSchwartz-o1y 3 ай бұрын
Kirlin Harbors
@HalifaxBlake-k8j
@HalifaxBlake-k8j 4 ай бұрын
Drew Corner
@SheridanAugustine-k5u
@SheridanAugustine-k5u 3 ай бұрын
Martina Extensions
@JosnaMonse-g5m
@JosnaMonse-g5m 3 ай бұрын
Samson Flats
@HeribertoThomas-g6e
@HeribertoThomas-g6e 4 ай бұрын
Langosh Groves
@JolineShukert-i4d
@JolineShukert-i4d 4 ай бұрын
Alexie Lock
@PeggyAries-b1l
@PeggyAries-b1l 3 ай бұрын
Hessel Points
@JeanetteLatimer-r7e
@JeanetteLatimer-r7e 3 ай бұрын
Dee Ville
@BirrellBella-t3t
@BirrellBella-t3t 4 ай бұрын
Kiel Inlet
GDB Tutorial
55:12
CS 246
Рет қаралды 75 М.
GDB Debugging: How to Debug a C/C++ program
18:07
pikuma
Рет қаралды 39 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
you will never ask about pointers again after watching this video
8:03
An Introduction to GDB for Debugging C Programs - COMP211 - Fall 2020
1:03:55
Debugging Embedded Systems With GDB?
13:51
Jacob Sorber
Рет қаралды 50 М.
Comparing C to machine language
10:02
Ben Eater
Рет қаралды 5 МЛН
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 343 М.
Debugging with Core Dumps
9:16
Jacob Sorber
Рет қаралды 67 М.
Makefiles Make Your Life Easier
12:05
NeuralNine
Рет қаралды 119 М.
Is C BETTER than C++ for beginners? // Code Review
31:16
The Cherno
Рет қаралды 94 М.