Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: Yue Lu <hacklu.newborn@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: how to continue from a breakpoint in GNU/Hurd
Date: Tue, 16 Jul 2013 17:29:00 -0000	[thread overview]
Message-ID: <CANFwon2bJhHcohhX4EUjsp6Mr1NgRv84n2w_XFdwHtHqhkfabA@mail.gmail.com> (raw)
In-Reply-To: <CAB8fV=hR=GDb5_gUjwoxA=sVivHV9TBWuAzuD5yZGnpGWFbNSA@mail.gmail.com>

On Wed, Jul 17, 2013 at 12:45 AM, Yue Lu <hacklu.newborn@gmail.com> 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 (陆岳)


  reply	other threads:[~2013-07-16 17:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 16:45 Yue Lu
2013-07-16 17:29 ` Hui Zhu [this message]
     [not found] <CAB8fV=i04n-eHTxP=7hWRkB7O1VJobvrMc5KSHOX0SkJ3vuqhQ@mail.gmail.com>
2013-07-16 16:44 ` Luis Machado
2013-07-16 17:05   ` Yue Lu
2013-07-16 17:26     ` Luis Machado
     [not found]       ` <CAB8fV=jnOcYCGmQ_emcoE0ZYH6MjT3K3a1P8=svRR+nKSMD69A@mail.gmail.com>
2013-07-17 12:10         ` Richard Braun
2013-07-17 16:07           ` Yue Lu
2013-07-17 16:13             ` Richard Braun
2013-07-17 16:22               ` Yue Lu
2013-07-18  9:03                 ` Richard Braun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANFwon2bJhHcohhX4EUjsp6Mr1NgRv84n2w_XFdwHtHqhkfabA@mail.gmail.com \
    --to=teawater@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=hacklu.newborn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox