C++ Weekly - Ep 453 - Valgrind + GDB Together!

แชร์
ฝัง

ความคิดเห็น • 18

  • @alexandrapetlanovahajkova2628
    @alexandrapetlanovahajkova2628 วันที่ผ่านมา +14

    Hi Jason, thank you for mentioning my work! I'm usually not getting any feedback from my blog posts and sometimes I'm wondering if it makes sense to write them at all. I'm going to have another article published soon, it's about improvements in file descriptors tracking in Valgrind. Everyone is welcome to comment on my blog posts, so I know what's actually interesting for the audience.

    • @vberthiaume
      @vberthiaume 19 ชั่วโมงที่ผ่านมา

      Got a link to the blog?

    • @paulfloyd9258
      @paulfloyd9258 16 ชั่วโมงที่ผ่านมา

      @@vberthiaume Yes. TH-cam auto deleted my first reply. Search for "redhat valgrind blog gdb close cooperation". Alexandra also wrote an excellent article, search for "Debug memory errors with Valgrind and GDB".

    • @paulfloyd9258
      @paulfloyd9258 6 ชั่วโมงที่ผ่านมา

      @@vberthiaume Search for "Valgrind and GDB in close cooperation"

    • @paulfloyd9258
      @paulfloyd9258 6 ชั่วโมงที่ผ่านมา

      @@vberthiaume And also th-cam.com/video/1VubqWmloZU/w-d-xo.html

  • @markminch1906
    @markminch1906 วันที่ผ่านมา +9

    Honestly, I would love a large TH-cam series of just different valgrind features, and another on exploring the features of gdb from the command line

  • @Ash-qp2yw
    @Ash-qp2yw วันที่ผ่านมา +6

    Oh, this looks really useful! I'd love to see another video on the aformentioned reverse debugging in gdb too

  • @tarun1105
    @tarun1105 21 ชั่วโมงที่ผ่านมา

    Its quite intresting. While exploring i found that there are literally so less of information about cpp memory management or debugging tools like gdb. Mostly their are basic stuffs only. Thnx for this.

  • @milasudril
    @milasudril วันที่ผ่านมา +2

    I have used it, and found it quite useful.

  • @fghdfghdfghdfg
    @fghdfghdfghdfg วันที่ผ่านมา +1

    I might suggest it is pronounced val-grind like coffee-grind, and no haven't grined since writing this 😁. Regardless, great video!

  • @sonulohani
    @sonulohani วันที่ผ่านมา +3

    Nice tutorial

  • @topticktom
    @topticktom วันที่ผ่านมา +23

    can you stop making videos so I can catch up? I'm 35 years behind in c++ topics.

  • @alexandrebustico9691
    @alexandrebustico9691 17 ชั่วโมงที่ผ่านมา

    I suppose valgrind + gdb could not work together for remote debugging MCU embedded program running on bare platform ?

  • @j7gy8b
    @j7gy8b วันที่ผ่านมา +1

    Yes! This is an undeservedly obscure feature of valgrind. And it's scriptable just like regular old gdb. If I may plug my own CppCon video: th-cam.com/video/ck_jCH_G7pA/w-d-xo.html

    • @paulfloyd9258
      @paulfloyd9258 16 ชั่วโมงที่ผ่านมา

      It is now scripted in Python (thanks to Philippe Waroquiers). Would it be possible for us to integrate your ppl, script?

  • @err6910
    @err6910 วันที่ผ่านมา +1

    For your simple use case like here, wouldn't it be just simpler to launch valgrind with --db-attach=yes option?

    • @paulfloyd9258
      @paulfloyd9258 16 ชั่วโมงที่ผ่านมา

      Sometimes two terminals is better (e.g., when the test exe generates a lot of output). We need to work with gdb to make this a bit easier.
      You can simplify the startup if you put the following in your .gdbinit file
      define set-program-name
      set logging file tmp.gdb
      set logging overwrite on
      set logging redirect on
      set logging enabled on
      python print(f"set $programname = \"{gdb.current_progspace().filename}\"")
      set logging enabled off
      set logging redirect off
      set logging overwrite off
      source tmp.gdb
      end
      define start_vg
      set-program-name
      eval "set remote exec-file %s", $programname
      show remote exec-file
      set sysroot /
      target extended-remote | vgdb --multi --vargs -q
      start
      end
      Then you can do something like
      $ gdb test_exe
      (gdb) start_vg
      and then you are in gdb connected to Valgrind.