From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15770 invoked by alias); 16 Jul 2013 16:44:30 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 15745 invoked by uid 89); 16 Jul 2013 16:44:30 -0000 X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_05,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 16 Jul 2013 16:44:29 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Uz8MP-0004wv-N4 from Luis_Gustavo@mentor.com ; Tue, 16 Jul 2013 09:44:21 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 16 Jul 2013 09:44:21 -0700 Received: from [172.30.1.104] ([172.30.1.104]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 16 Jul 2013 09:44:21 -0700 Message-ID: <51E5785D.1050904@codesourcery.com> Date: Tue, 16 Jul 2013 16:44:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Yue Lu CC: gdb@sourceware.org, bug-hurd@gnu.org, Thomas Schwinge Subject: Re: how to continue from a breakpoint in GNU/Hurd References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00044.txt.bz2 Hi, On 07/16/2013 01:28 PM, Yue Lu wrote: > Hi. > > I am writing a debugger demo under GNU/Hurd when I study the gdb source > code. And I have met a big problem that when I set a breakpoint in the > inferior, my code can't resume inferior from it. > > I can get the exception message from the mach kernel when the inferior > hit the breakpoint. As soon as I got the exception message, I removed > the int3, and set the EIP to the previous values, then post a signal > zero to the inferior by msg_sig_post_untraced_request(). at last I > called thread_resume() to resume it. But thing goes wrong, the inferior > is always stops at the breakpoint. and seems never to continue. Some general thoughts... Can you make sure the breakpoint has been lifted from the instruction it replaced? If the breakpoint has been lifted and it is still being hit, then it sounds like there is some kind of instruction cache problem going on, where we first need to flush the icache before resuming execution. If the icache is the problem, then it sounds like something the kernel itself needs to address. Luis