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: Yue Lu <hacklu dot newborn at gmail dot com>
- To: Luis Machado <lgustavo at codesourcery dot com>
- Cc: gdb at sourceware dot org, bug-hurd at gnu dot org, Thomas Schwinge <thomas at codesourcery dot com>
- Date: Wed, 17 Jul 2013 01:04:55 +0800
- Subject: Re: how to continue from a breakpoint in GNU/Hurd
- References: <CAB8fV=i04n-eHTxP=7hWRkB7O1VJobvrMc5KSHOX0SkJ3vuqhQ at mail dot gmail dot com> <51E5785D dot 1050904 at codesourcery dot com>
Hi,
thanks for you reply.
On Wed, Jul 17, 2013 at 12:44 AM, Luis Machado
<lgustavo@codesourcery.com> 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, 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
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 (éå)