From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16476 invoked by alias); 16 Jul 2013 17:05:20 -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 16415 invoked by uid 89); 16 Jul 2013 17:05:19 -0000 X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS autolearn=ham version=3.3.1 Received: from Unknown (HELO mail-lb0-f178.google.com) (209.85.217.178) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 16 Jul 2013 17:05:18 +0000 Received: by mail-lb0-f178.google.com with SMTP id y6so793561lbh.37 for ; Tue, 16 Jul 2013 10:05:10 -0700 (PDT) X-Received: by 10.152.21.131 with SMTP id v3mr1149583lae.50.1373994310068; Tue, 16 Jul 2013 10:05:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.231 with HTTP; Tue, 16 Jul 2013 10:04:55 -0700 (PDT) In-Reply-To: <51E5785D.1050904@codesourcery.com> References: <51E5785D.1050904@codesourcery.com> From: Yue Lu Date: Tue, 16 Jul 2013 17:05:00 -0000 Message-ID: Subject: Re: how to continue from a breakpoint in GNU/Hurd To: Luis Machado Cc: gdb@sourceware.org, bug-hurd@gnu.org, Thomas Schwinge Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-07/txt/msg00046.txt.bz2 Hi, thanks for you reply. On Wed, Jul 17, 2013 at 12:44 AM, Luis Machado wrote: > 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, th= en > 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 I don't know how to flush the icache off-hand, so I used anther way to bypass this issue. I set the eip to the next instruction's address to bypass the breakpoint ins. But problem seems doesn't go away. -- Yue Lu (=E9=99=86=E5=B2=B3)