Debugging a program that uses SIGINT with gdb

前端 未结 3 1798
挽巷
挽巷 2021-02-07 09:41

I frequently work with PostgreSQL for debugging, and it uses SIGINT internally for some of its inter-backend signalling.

As a result when running certain ba

3条回答
  •  隐瞒了意图╮
    2021-02-07 10:12

    Readers who end up on this page (as I did) with a slightly different variation of this problem, would perhaps be more interested in this question:

    Debugging a segmentation fault when I do ctrl c

    ... and its answer, which is:

    • send SIGINT from inside gdb itself:

      (gdb) signal 2

    (Normally I would post the link as a simple comment under the OP's question on this page, but since there are already 7 comments, comments are being hidden/buried.)

    If you read all the details of the OP's question here, then it is obvious that my answer is not correct for OP.

    However, my answer is correct for many situations that could be described by the same title: "Debugging a program that uses SIGINT with gdb"

提交回复
热议问题