• milicent_bystandr
    link
    fedilink
    arrow-up
    2
    ·
    23 days ago

    How would you use that for debugging?

    (Sry I’m too cheap to go and buy the book)

    • jxk@sh.itjust.works
      link
      fedilink
      arrow-up
      6
      ·
      23 days ago

      My best guess is that in some configurations it raises SIGSEGV and then dumps core. Then, you use a debugger to analyse the core dump. But then again you could also set a breakpoint, or if you absolutely want a core dump, use abort() and configure SIGABRT to produce a core dump.

    • Laura@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      21 days ago

      to see whether your code has executed a certain path (like printf(“here”) but as a crash)