From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: can't single-step on gdb
Date: Tue, 12 Aug 2008 02:48:15 +0000 [thread overview]
Message-ID: <20080812024815.GA31588@linux-sh.org> (raw)
In-Reply-To: <20080812.100434.68561126.saito@densan.co.jp>
On Tue, Aug 12, 2008 at 11:22:10AM +0900, Paul Mundt wrote:
> On Tue, Aug 12, 2008 at 10:04:34AM +0900, Hideo Saito wrote:
> > Hi Paul,
> >
> > I have a problem as to tracing a program using gdb on my
> > platform(SH7780). I can single-step a program on gdb usually, however,
> > in some conditions, I can not single-step the program because gdb does
> > not change the PC without any failed assertions.
> >
> > It seems that do_syscall_trace() sets SIGTRAP in exit_code in the task
> > structure before the traced program executes the instruction. I think
> > that do_syscall_trace should ignore single-step because the schedule of
> > the traced process might be delayed.
> >
> Yes, there were a couple of other single-step related bugs that showed up
> as well. All of those fixes went in to 2.6.27-rc2, so you may want to
> take a look at that. Please see if you have any outstanding issues with
> current git.
To elaborate on this, the single-step rework falls in to a couple of
categories:
- general bugs
- hooking in to the general ptrace API more consistently
- tracehook conversion
the first two you can easily backport in to whatever kernel you happen to
be using, while the tracehook bits are obviously only going to be
relevant for recent kernels.
Given that, the commits you want to look at are probably:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hÎc3fd3e2a7cacf37e2bd6d9fa915337245cc563;hpÚf423db3b6afd90ecdd776dbc32c0b57cc78edb
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hÄ59dbf294b4a3d70490a468a7ca3907fb2c2f57
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h«99c733ae73cce31f2a2434f7099564e5a73d95
prev parent reply other threads:[~2008-08-12 2:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-12 1:04 can't single-step on gdb Hideo Saito
2008-08-12 2:22 ` Paul Mundt
2008-08-12 2:48 ` Paul Mundt [this message]
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=20080812024815.GA31588@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.org \
/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