public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: archer@sourceware.org, utrace-devel@redhat.com
Subject: ugdb && breakpoints
Date: Fri, 10 Sep 2010 22:03:00 -0000	[thread overview]
Message-ID: <20100910220007.GA6587@redhat.com> (raw)
In-Reply-To: <y0my6bbccqs.fsf@fche.csb>

On 09/09, Frank Ch. Eigler wrote:
>
> Oleg Nesterov <oleg@redhat.com> writes:
>
> > [...]
> > But, Jan. Implementing the memory writes does not mean breakpoints
> > automatically start to work!
>
> It approximately should though.

No.

Frank, I guess I did a mistake, I should have read the pdf you sent
me first. I'll read it anyway later, but I think that I already
understand how this work.

	gdb replaces the original insn with "int 3".

	the tracee reports SIGTRAP.

	Now, to continue the tracee, gdb does not restore the
	original instruction. Instead, it

		- writes this insn into _start code

		- changes regs->ip to point to this insn

		- does single-step to execute this insn

		- changes regs->ip again

So. Let's forget about breakpoints temporary. ugdb needs the single
stepping first.

Damn. I spent much more time than I'd wish trying to understand this.
I misunderstood the "target byte order" part in the documentation of
P packet.

Oleg.

  parent reply	other threads:[~2010-09-10 22:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 19:22 gdbstub initial code, v9 Oleg Nesterov
2010-09-09 10:29 ` Jan Kratochvil
2010-09-09 15:06   ` Oleg Nesterov
2010-09-09 12:39 ` Frank Ch. Eigler
2010-09-09 15:33   ` Oleg Nesterov
2010-09-09 15:54     ` Oleg Nesterov
2010-09-09 16:07       ` Frank Ch. Eigler
2010-09-09 16:37         ` Oleg Nesterov
2010-09-09 16:11       ` Jan Kratochvil
2010-09-09 16:34         ` Oleg Nesterov
2010-09-09 16:36           ` Jan Kratochvil
2010-09-09 16:48             ` Oleg Nesterov
2010-09-09 16:50               ` Oleg Nesterov
2010-09-09 16:51               ` Tom Tromey
2010-09-10 10:12                 ` Roland McGrath
2010-09-10 18:14                   ` Oleg Nesterov
2010-09-10 19:43                     ` Tom Tromey
2010-09-10 19:49                       ` Oleg Nesterov
2010-09-13  5:54     ` Kevin Buettner
2010-09-14  2:20       ` Roland McGrath
2010-09-14 16:10         ` Oleg Nesterov
2010-09-14 16:30           ` Jan Kratochvil
2010-09-14 21:30             ` Tom Tromey
2010-09-15 19:43           ` Kevin Buettner
2010-09-10 22:03   ` Oleg Nesterov [this message]
2010-09-10 22:12     ` ugdb && breakpoints Tom Tromey
2010-09-14 19:38       ` Roland McGrath
2010-09-14 19:47         ` Oleg Nesterov

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=20100910220007.GA6587@redhat.com \
    --to=oleg@redhat.com \
    --cc=archer@sourceware.org \
    --cc=fche@redhat.com \
    --cc=utrace-devel@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).