Article View: gnu.gdb.bug
Article #1302Program received signal SIGTRAP, Trace/breakpoint ...
From: 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
Technical Details
Message-ID:
<mailman.65.1089181960.22971.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f5053,deb368898f79424a,start X-Google-Attributes: gidf5053,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail From: David Xu <davidxu@freebsd.org> Newsgroups: gnu.gdb.bug Subject: Program received signal SIGTRAP, Trace/breakpoint ... Date: Wed, 07 Jul 2004 14:33:23 +0800 Lines: 28 Approved: bug-gdb@gnu.org Message-ID: <mailman.65.1089181960.22971.bug-gdb@gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.Stanford.EDU 1089181833 25824 199.232.76.165 (7 Jul 2004 06:30:33 GMT) X-Complaints-To: news@news.stanford.edu To: bug-gdb@gnu.org Envelope-to: bug-gdb@gnu.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030723 Thunderbird/0.1 X-Accept-Language: en-us, en X-BeenThere: bug-gdb@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/bug-gdb> List-Post: <mailto:bug-gdb@gnu.org> List-Help: <mailto:bug-gdb-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=subscribe>