On Fri, Sep 03 2021, Mark Kettenis <mark.kette...@xs4all.nl> wrote: >> From: Jeremie Courreges-Anglas <j...@wxcvbn.org> >> Date: Fri, 03 Sep 2021 14:32:26 +0200 >> >> Two changes that would be useful: >> - enable PT_*FPREGS, Mark has already done the job.
>> - hide PT_STEP since hardware support seems missing (the spec only talks >> about single stepping support in "Debug mode", which is not "Machine" or >> "Supervisor" mode). Since we don't emulate it (like mips64 for >> example) it doesn't make sense to provide the define. >> I doubt that >> hiding PT_STEP [will] magically fix devel/gdb runtime support though. Actually it does. (gdb) b main Breakpoint 1 at 0x1d00: file /usr/src/usr.bin/du/du.c, line 69. (gdb) r Starting program: /usr/obj/usr.bin/du/du Breakpoint 1, main (argc=<optimized out>, argv=<optimized out>) at /usr/src/usr.bin/du/du.c:69 69 if (pledge("stdio rpath", NULL) == -1) (gdb) The details are a bit gory but somehow egdb manages to cope. >> >> Thoughts? ok? > > ok kettenis@ Thank you Mark! >> Index: ptrace.h >> =================================================================== >> RCS file: /d/cvs/src/sys/arch/riscv64/include/ptrace.h,v >> retrieving revision 1.2 >> diff -u -p -p -u -r1.2 ptrace.h >> --- ptrace.h 12 May 2021 01:20:52 -0000 1.2 >> +++ ptrace.h 3 Sep 2021 12:25:54 -0000 >> @@ -16,10 +16,10 @@ >> * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. >> */ >> >> +#if 0 >> #define PT_STEP (PT_FIRSTMACH + 0) >> +#endif >> #define PT_GETREGS (PT_FIRSTMACH + 1) >> #define PT_SETREGS (PT_FIRSTMACH + 2) >> -#if 0 // XXX ptrace fpreg support >> #define PT_GETFPREGS (PT_FIRSTMACH + 3) >> #define PT_SETFPREGS (PT_FIRSTMACH + 4) >> -#endif >> >> >> -- >> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE >> >> > -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE