gdb: set a breakpoint for a SIGBUS handler

前端 未结 4 1963
孤独总比滥情好
孤独总比滥情好 2021-02-08 20:14

I\'m trying to debug a simple stop-and-copy garbage collector (written in C) using GDB. The GC works by handling SIGBUS. I\'ve set a breakpoint at the top of my SIGBUS signal ha

4条回答
  •  野性不改
    2021-02-08 20:32

    The same code (modified to handle SIGSEGV too) works as expected in GDB on Linux; it may be a bug in OS X or GDB's port to that platform.

    Googling finds broken OS X behavior just like yours all the way back on 10.1, with a sort-of workaround (set inferior-bind-exception-port off before running the program).

    (There's a similar bug on Windows.)

提交回复
热议问题