Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Yue Lu <hacklu.newborn@gmail.com>
To: Luis Machado <lgustavo@codesourcery.com>
Cc: gdb@sourceware.org, bug-hurd@gnu.org,
		Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: how to continue from a breakpoint in GNU/Hurd
Date: Tue, 16 Jul 2013 17:05:00 -0000	[thread overview]
Message-ID: <CAB8fV=iuUFiNtoU-Trw_GnujMW1REMj2=ZciR=36RDJx1+8wSQ@mail.gmail.com> (raw)
In-Reply-To: <51E5785D.1050904@codesourcery.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 (陆岳)


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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAB8fV=i04n-eHTxP=7hWRkB7O1VJobvrMc5KSHOX0SkJ3vuqhQ@mail.gmail.com>
2013-07-16 16:44 ` Luis Machado
2013-07-16 17:05   ` Yue Lu [this message]
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
2013-07-16 16:45 Yue Lu
2013-07-16 17:29 ` Hui Zhu

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='CAB8fV=iuUFiNtoU-Trw_GnujMW1REMj2=ZciR=36RDJx1+8wSQ@mail.gmail.com' \
    --to=hacklu.newborn@gmail.com \
    --cc=bug-hurd@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=lgustavo@codesourcery.com \
    --cc=thomas@codesourcery.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