From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17976 invoked by alias); 16 Jul 2013 17:29:41 -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 17967 invoked by uid 89); 16 Jul 2013 17:29:41 -0000 X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,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-oa0-f44.google.com) (209.85.219.44) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 16 Jul 2013 17:29:40 +0000 Received: by mail-oa0-f44.google.com with SMTP id l10so1205680oag.17 for ; Tue, 16 Jul 2013 10:29:33 -0700 (PDT) X-Received: by 10.182.39.168 with SMTP id q8mr697740obk.72.1373995773082; Tue, 16 Jul 2013 10:29:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.116.101 with HTTP; Tue, 16 Jul 2013 10:28:53 -0700 (PDT) In-Reply-To: References: From: Hui Zhu Date: Tue, 16 Jul 2013 17:29:00 -0000 Message-ID: Subject: Re: how to continue from a breakpoint in GNU/Hurd To: Yue Lu Cc: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-07/txt/msg00048.txt.bz2 On Wed, Jul 17, 2013 at 12:45 AM, 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, I am not sure but I think you need care about this part is: In x86, after the inferior is broken by int3, it will point to the address after int3. So the right address to continue inferior is eip-1. Thanks, Hui 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. > > I don't know how to fix this, could any of you give me a suggestion? > thanks very much. > > -- > Yue Lu (=E9=99=86=E5=B2=B3)