This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: how to continue from a breakpoint in GNU/Hurd
- From: Hui Zhu <teawater at gmail dot com>
- To: Yue Lu <hacklu dot newborn at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 17 Jul 2013 01:28:53 +0800
- Subject: Re: how to continue from a breakpoint in GNU/Hurd
- References: <CAB8fV=hR=GDb5_gUjwoxA=sVivHV9TBWuAzuD5yZGnpGWFbNSA at mail dot gmail dot 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 (éå)