mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Oleg Nesterov <oleg@redhat.com>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xuefeng Li <lixuefeng@loongson.cn>,
	kernel test robot <lkp@intel.com>,
	Xingxing Su <suxingxing@loongson.cn>
Subject: Re: [PATCH v2] MIPS: Add basic support for ptrace single step
Date: Thu, 11 Feb 2021 11:29:05 +0100	[thread overview]
Message-ID: <20210211102905.GE7985@alpha.franken.de> (raw)
In-Reply-To: <1612939961-8827-1-git-send-email-yangtiezhu@loongson.cn>

On Wed, Feb 10, 2021 at 02:52:41PM +0800, Tiezhu Yang wrote:
> In the current code, arch_has_single_step() is not defined on MIPS,
> that means MIPS does not support instruction single-step for user mode.
> 
> Delve is a debugger for the Go programming language, the ptrace syscall
> PtraceSingleStep() failed [1] on MIPS and then the single step function
> can not work well, we can see that PtraceSingleStep() definition returns
> ptrace(PTRACE_SINGLESTEP) [2].
> 
> So it is necessary to support ptrace single step on MIPS.

one way to see it. The other way is, that the Go debugger needs to learn
single stepping without ptrace single step support. IMHO gdb is already
able to do that.

IMHO ptrace single step is for CPUs supporting single stepping and not
for emulating it in the kernel.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

       reply	other threads:[~2021-02-11 10:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1612939961-8827-1-git-send-email-yangtiezhu@loongson.cn>
2021-02-11 10:29 ` Thomas Bogendoerfer [this message]
2021-02-12 16:33   ` Thomas Bogendoerfer
2021-02-16 13:55     ` Maciej W. Rozycki
2021-02-18 10:57       ` Thomas Bogendoerfer

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=20210211102905.GE7985@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=lkp@intel.com \
    --cc=oleg@redhat.com \
    --cc=suxingxing@loongson.cn \
    --cc=yangtiezhu@loongson.cn \
    /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

all inboxes | Powered by JetHome®