Program received signal SIGTRAP, Trace/breakpoint trap

后端 未结 4 1191
夕颜
夕颜 2021-02-05 05:18

I\'m debugging a piece of (embedded) software. I\'ve set a breakpoint on a function, and for some reason, once I\'ve reached that breakpoint and continue I always c

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-05 05:49

    Breakpoint trap just means the processor has hit a breakpoint. There are two possibilities for why this is happening. Most likely, your initialization code is being hit because your CPU is resetting and hitting the breakpoint again. The other possibility would be that the code where you set the breakpoint is actually run in places other than initialization. Sometimes with aggressive compiler optimization it can be hard to tell exactly which code your breakpoint maps to and which execution paths can get there.

提交回复
热议问题