Debug faster with gdb layouts (TUI)

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025

Комментарии • 60

  • @subhashisghose
    @subhashisghose 4 года назад +24

    Thank You for demonstrating the TUI in GDB. This is going to be Helpful.

    • @JacobSorber
      @JacobSorber  4 года назад +3

      You're welcome. Glad I could help.

  • @bzboii
    @bzboii 4 года назад +9

    I used this trick when doing my bomblab assignment. Helps so freaking much.
    A big tip here is also that control+L refreshes the TUI, as it often gets weirdly "corrupted" and needs often refreshing.

    • @sayori3939
      @sayori3939 10 месяцев назад +1

      The command "ref" does the same

  • @JannisAdmek
    @JannisAdmek 4 года назад +5

    Nice video and happy new year to all fellow C programmers!

  • @diceandbricks
    @diceandbricks 4 года назад +1

    Cool. I didn't know about that. Been coding for 30 years and still learning. That's why I like your channel.

    • @JacobSorber
      @JacobSorber  4 года назад +1

      Me too. Glad I could help.

  • @drvanon
    @drvanon 3 года назад

    Not having known about this before, you have just revolutionized my debugging experience!

  • @smartkorean1
    @smartkorean1 Год назад

    This is amazing! Had no idea this was a feature and I've been painfully using GDB this entire semester....

  • @zirkoni42
    @zirkoni42 2 года назад +7

    Instead of "b main" & "r" you could just do "start".
    Also, instead of "layout next" use "layout src" (or whatever layout name you want).

  • @moenasab1995
    @moenasab1995 2 года назад

    I always respected my professors at university and learned many things from them, but I think I have learned even more from you. Thank you professor and please keep on your valuable online courses.

  • @sakuyarules
    @sakuyarules Год назад

    This is a godsend, thank you!

  • @virajcz7143
    @virajcz7143 Год назад

    This is so good! Thank you so much!

  • @huyibao
    @huyibao 2 года назад

    thank you for gdb demo.

  • @grahamjoss4643
    @grahamjoss4643 3 года назад

    wow. where have you been all my life ...

  • @anonymousvevo8697
    @anonymousvevo8697 3 года назад

    You are a hero !

  • @johnybaker9878
    @johnybaker9878 4 года назад +4

    Hi Jacob, can you do tutorial, maybe share some tweaks on how to better understand other people's code, especially when it's a big project with a lot of .c and .h files? Thanks.

  • @vanowik7518
    @vanowik7518 4 года назад

    There are extensions to gdb like pwndbg or peda that make it much more friendly.

  • @benjaminshinar9509
    @benjaminshinar9509 4 года назад

    i was aware of tui, but not of changing layouts.
    and the nexti,stepi could be huge!

    • @JacobSorber
      @JacobSorber  4 года назад

      Yeah, I don't use them ever day, but when they're useful...they're REALLY useful.

  • @synfuel
    @synfuel 4 года назад +16

    I think it would be great if you made a discord server. Just for people to share and learn from others and it would be easier to help people.

  • @ladyViviaen
    @ladyViviaen 4 года назад +5

    its gdb time

  • @marusdod3685
    @marusdod3685 4 года назад +4

    I usually just press ctrl-x-a

  • @fmontserrattube
    @fmontserrattube 3 года назад

    I have this "m68k-elf-gdb.exe" gdb client wich i use to debug 68k assembly, but it does not support tui....i've been trying to recompile it whit added support with no luck, any idea on how to enable tui in this version???

  • @cernejr
    @cernejr 4 года назад

    Short AND helpful. :)

  • @vladimir_k_bestplayerna1217
    @vladimir_k_bestplayerna1217 2 года назад

    I see that you can also see the values stored in the registers live. Is it possible to have all 3 shown at once? C code, Assembly, and register values?

  • @chrisfahed8361
    @chrisfahed8361 4 года назад

    Would you please make a video about Math in embedded systems and btw very helpful videos keep going

  • @stelluspereira
    @stelluspereira Год назад

    BTW, GDB in MacOS Venura Gives error , some odd libraries permissions error for setting break points

  • @testshar2117
    @testshar2117 3 года назад

    Does this command works in putty session? What to do if it doesn't?

  • @asadkhasanov1056
    @asadkhasanov1056 4 года назад

    Fantastic!

  • @maiconfaria
    @maiconfaria 4 года назад

    Would be nice to have some tool to visualize and compare big arrays on GDB

  • @realdragon
    @realdragon Год назад

    Cannot enable the TUI: error opening terminal [TERM=xterm-256color]

  • @giacomog1128
    @giacomog1128 2 года назад

    do you know if there's a layout gdb for java programs?

  • @NxNx-gb3hp
    @NxNx-gb3hp 4 года назад

    Hi, tnx 4 ur awesome tutorials. Can u make a tutorial on how to build an ISO imagine of a Linux kernel from Linux source code that can actually be used in virtualbox

  • @arsrivaszaredan8217
    @arsrivaszaredan8217 3 года назад

    thanks a lot!!!!

  • @paullemmermann5993
    @paullemmermann5993 4 года назад +1

    Can you do a tutorial about Radare2?

    • @JacobSorber
      @JacobSorber  4 года назад

      Yeah, probably. I'll add it to my topic list and see what I can do down the road. Thanks.

  • @dusankolak4359
    @dusankolak4359 3 года назад

    is there a way for me to display stack at every step? or have a window dedicated to stack? instead of typing bt full every step. thanks for the video!

    • @JacobSorber
      @JacobSorber  3 года назад +2

      Of course. 😀type "define hook-stop". Then type in "bt", then "end". Now, every time your program stops, gdb will run "bt" for you.

    • @dusankolak4359
      @dusankolak4359 3 года назад

      @@JacobSorber thank you very much!!!

    • @dusankolak4359
      @dusankolak4359 3 года назад

      @@JacobSorber thanks for this again. just passed my exam with highest marks and i used gdb to debug. define hook-stop helped me speed things up so much!

  • @MarquisDeSang
    @MarquisDeSang Год назад

    It is better to use GDB inside EMACS with the full 6 viewports.

  • @rafalmichalski4893
    @rafalmichalski4893 4 года назад

    Hi Jacob. How did you split these two views: C and Assembler ?

    • @pumpkin3586
      @pumpkin3586 4 года назад

      At 2:19 you see that with "layout next" you can find the layout you are looking for.

    • @JannisAdmek
      @JannisAdmek 4 года назад

      depending on the terminal, you might not have curses support, specially Windows Comand line doesn't have curses support as far as I know.

    • @JacobSorber
      @JacobSorber  4 года назад +3

      Thanks, Jannis. Yes, you need curses support for this to work. Also, if you don't want to cycle through the layouts, and you know which one you want, just type "layout split" to get the split layout, or "layout src" for just the source and command views.

  • @dontaskme1625
    @dontaskme1625 4 года назад

    don't apologize that it was a short video, everyone who clicks on the video sees it before they click ;)

  • @freddieventura4382
    @freddieventura4382 Год назад

    Really not much information in this video but just introducing a bit the feature

  • @RuthAnderson-g2m
    @RuthAnderson-g2m 3 месяца назад

    754 Gloria Rapid

  • @yash1152
    @yash1152 3 года назад

    1:36 TUI

  • @BrianDavis-d8n
    @BrianDavis-d8n 4 месяца назад

    Hegmann Well

  • @TamikoMccaffree-r5l
    @TamikoMccaffree-r5l 4 месяца назад

    Denesik Streets

  • @mikeyamaro9035
    @mikeyamaro9035 4 года назад

    bruuhh arm-aebi-none-gdb 2020 doesnt support tui.

  • @Maranello988
    @Maranello988 4 года назад +3

    VIM, GCC, GDB
    The rest is unnecessary :)

    • @angelcaru
      @angelcaru 8 месяцев назад

      You forgot MAN

  • @AJ-fo3hp
    @AJ-fo3hp 4 года назад

    Linux has still in olden days debugging techniques, this is seem to be tedious debugging as well less devolper friendly

    • @JacobSorber
      @JacobSorber  4 года назад

      Today's terminal debuggers (gdb, lldb) definitely aren't perfect, but after using dozens of different debugging tools, it's amazing how a quick gdb session (with a reasonably good .gdbinit file) is still often the fastest option for me. There's definitely a learning curve.