Dhanesh
Dhanesh

Reputation: 1141

GDB Debugging: Application termintes with SIGTRAP

Have been trying to remote debug an application running on my target using GDB. The target is Armv6 based, the OS is linux and the application is a QT based Multithreaded application.

I am able to set the break point. But when the break point is hit, program gets crashed along with SIGTRAP.

Hint: I am able to run another small sample Multithreaded QT-App on the same target.

What could be the problem?

GDB Log as follows

Breakpoint 1 at 0x4ad52c: file <> , <>. (2 locations) (gdb) c Continuing.

Program terminated with signal SIGTRAP, Trace/breakpoint trap. The program no longer exists. (gdb)

(gdb)

Upvotes: 5

Views: 19421

Answers (2)

jingchun.zhang
jingchun.zhang

Reputation: 81

well, the gdb trace the process by ptrace , and the ptrace set breakpoint in the space of the thread , the space addr is shared by the other thread, if the other thread reached the breakpoint, oh, the kernel generate a sigtrap for the thread.

more info in the follow http://lists.alioth.debian.org/pipermail/ltrace-devel/2006-April/000036.html

Upvotes: 1

Related Questions