1. 4
  1.  

  2. 1

    I suppose it was silly to expect interactive debugging such as Common Lisp provides.

    But intercepting a live program in production for debugging purposes is not feasible because it would impact the production system.

    This is false, as my expectation implies.

    To understand a program at any exact moment, we use core dumps.

    Core dumps don’t contain the entire state of a program.

    If a process is crashing consistently without enough diagnostics, it might be hard to pinpoint to the problem without conventionally debugging the program.

    Programs shouldn’t really ’‘crash’’ anyway.

    The difficulty of reproducing production environments lead to the fact it is hard to reproduce the execution flows that are taking place in production.

    This is all the more reason to support interactive debugging, which is low-cost.

    It is primarily used for post-mortem debugging of a program

    To paraphrase ’‘The UNIX-Hater’s Handbook’’, this is like medicine as autopsy.

    1. 2

      Core dumps don’t contain the entire state of a program.

      What state that you need for debugging is missing from a core file?

      1. 2

        Current offset for open files possibly. Actually lots of file info that’s typically stored kernel side. Remote address of sockets.

        1. 1

          We include a lot of that information in ELF notes on illumos.