public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdbserver: Remove srv_linux_usrregs setting in RISCV
@ 2022-05-09 12:39 Youling Tang
  2022-05-09 14:17 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Youling Tang @ 2022-05-09 12:39 UTC (permalink / raw)
  To: gdb-patches; +Cc: Maciej W . Rozycki

In the linux kernel code of RISCV, ptrace does not have the implementation
of PTRACE_POKEUSR/PTRACE_PEEKUSR in the arch_ptrace function (like aarch64),
If srv_linux_usrregs is set to yes, HAVE_LINUX_USRREGS will be defined, so
remove the srv_linux_usrregs setting.

Signed-off-by: Youling Tang <tangyouling@loongson.cn>
---
 gdbserver/configure.srv | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv
index d37053628fc..6840c3964cf 100644
--- a/gdbserver/configure.srv
+++ b/gdbserver/configure.srv
@@ -257,7 +257,6 @@ case "${gdbserver_host}" in
 			srv_tgtobj="${srv_tgtobj} linux-riscv-low.o"
 			srv_tgtobj="${srv_tgtobj} ${srv_linux_obj}"
 			srv_linux_regsets=yes
-			srv_linux_usrregs=yes
 			srv_linux_thread_db=yes
 			;;
   s390*-*-linux*)	srv_regobj="s390-linux32.o"
-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdbserver: Remove srv_linux_usrregs setting in RISCV
  2022-05-09 12:39 [PATCH] gdbserver: Remove srv_linux_usrregs setting in RISCV Youling Tang
@ 2022-05-09 14:17 ` Tom Tromey
  2022-05-09 14:44   ` Maciej W. Rozycki
  2022-05-13 16:32   ` Palmer Dabbelt
  0 siblings, 2 replies; 4+ messages in thread
From: Tom Tromey @ 2022-05-09 14:17 UTC (permalink / raw)
  To: Youling Tang; +Cc: gdb-patches, Maciej W . Rozycki

>>>>> Youling Tang <tangyouling@loongson.cn> writes:

> In the linux kernel code of RISCV, ptrace does not have the implementation
> of PTRACE_POKEUSR/PTRACE_PEEKUSR in the arch_ptrace function (like aarch64),
> If srv_linux_usrregs is set to yes, HAVE_LINUX_USRREGS will be defined, so
> remove the srv_linux_usrregs setting.

Looks reasonable to me.
Thank you.

Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdbserver: Remove srv_linux_usrregs setting in RISCV
  2022-05-09 14:17 ` Tom Tromey
@ 2022-05-09 14:44   ` Maciej W. Rozycki
  2022-05-13 16:32   ` Palmer Dabbelt
  1 sibling, 0 replies; 4+ messages in thread
From: Maciej W. Rozycki @ 2022-05-09 14:44 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Youling Tang, gdb-patches

On Mon, 9 May 2022, Tom Tromey wrote:

> > In the linux kernel code of RISCV, ptrace does not have the implementation
> > of PTRACE_POKEUSR/PTRACE_PEEKUSR in the arch_ptrace function (like aarch64),
> > If srv_linux_usrregs is set to yes, HAVE_LINUX_USRREGS will be defined, so
> > remove the srv_linux_usrregs setting.
> 
> Looks reasonable to me.

 Yeah, it must have been an oversight.  Thanks for the fix!

  Maciej

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdbserver: Remove srv_linux_usrregs setting in RISCV
  2022-05-09 14:17 ` Tom Tromey
  2022-05-09 14:44   ` Maciej W. Rozycki
@ 2022-05-13 16:32   ` Palmer Dabbelt
  1 sibling, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2022-05-13 16:32 UTC (permalink / raw)
  To: tom; +Cc: tangyouling, gdb-patches, macro

On Mon, 09 May 2022 07:17:18 PDT (-0700), tom@tromey.com wrote:
>>>>>> Youling Tang <tangyouling@loongson.cn> writes:
>
>> In the linux kernel code of RISCV, ptrace does not have the implementation
>> of PTRACE_POKEUSR/PTRACE_PEEKUSR in the arch_ptrace function (like aarch64),
>> If srv_linux_usrregs is set to yes, HAVE_LINUX_USRREGS will be defined, so
>> remove the srv_linux_usrregs setting.
>
> Looks reasonable to me.

For some reason Maciej's email is only showing up in my gmail, so I'm 
just pasting in

>  Yeah, it must have been an oversight.  Thanks for the fix!

IIRC we had some out-of-tree ptrace() implementations that were to the 
old style, but they never made it upstream.  I bet the GDB support just 
stuck around, but I don't see a reason to keep it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-13 16:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 12:39 [PATCH] gdbserver: Remove srv_linux_usrregs setting in RISCV Youling Tang
2022-05-09 14:17 ` Tom Tromey
2022-05-09 14:44   ` Maciej W. Rozycki
2022-05-13 16:32   ` Palmer Dabbelt

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).