Thread View: gnu.gdb.bug
1 messages
1 total messages
Started by David Xu
Wed, 07 Jul 2004 06:33
Program received signal SIGTRAP, Trace/breakpoint ...
Author: David Xu
Date: Wed, 07 Jul 2004 06:33
Date: Wed, 07 Jul 2004 06:33
24 lines
2612 bytes
2612 bytes
I am writting pthread target module for FreeBSD 5, I have patch for gdb 5.2, that works fine, but because recently they imported gdb 6.1 into tree, I have updated my patch for gdb 6.1, and found it does not work well, when debugging a threaded process, I always get message "Program received signal SIGTRAP, Trace/breakpoint ", <http://sources.redhat.com/ml/gdb/2003-05/msg00239.html> and if I type "next", program crashes with SIGSEGV. Deeply digging into gdb 6.1 source code, found that in file infrun.c, function adjust_pc_after_break() sometimes does not adjust pc, this happens when a new thread hits a breakpoint after 'next' command, in the case, the following condition are true in adjust_pc_after_break() : software_breakpoint_inserted_here_p (stop_pc) currently_stepping (ecs) prev_pc != stop_pc step_range_end the following condition is false: INNER_THAN (read_sp (), (step_sp - 16)) If I remove 'INNER_THAN' from the function, everything works again, is the INNER_THAN condition meanful for new thread while inferior_ptid is still referencing the previous waited ptid ? David Xu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads