Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Luis Machado <lgustavo@codesourcery.com>
To: Yue Lu <hacklu.newborn@gmail.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 16:44:00 -0000	[thread overview]
Message-ID: <51E5785D.1050904@codesourcery.com> (raw)
In-Reply-To: <CAB8fV=i04n-eHTxP=7hWRkB7O1VJobvrMc5KSHOX0SkJ3vuqhQ@mail.gmail.com>

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


       reply	other threads:[~2013-07-16 16:44 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 [this message]
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
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=51E5785D.1050904@codesourcery.com \
    --to=lgustavo@codesourcery.com \
    --cc=bug-hurd@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=hacklu.newborn@gmail.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