Commit Graph

28 Commits

Author SHA1 Message Date
kamil
fbd2c6be23 Update TODO.ptrace
Remove entries:
  - research support PT_SYSCALL & PT_STEP combined like in Linux
  - GDB Remote Protocol expects a case with a step with a signal to be sent,
    this is currently unsupported on NetBSD

Implemented as PT_SETSTEP and PT_CLEARSTEP.

Remove:
  - support QPassSignals (PT_SET_SIGPASS/PT_GET_SIGPASS) in the kernel, a way to
    stop routing a set of signals to tracer as they are uninteresting - GDB and
    LLDB expect this feature

This interface has been abandoned and will be handled on the debugger level.

Sponsored by <The NetBSD Foundation>
2017-04-08 01:08:36 +00:00
kamil
20b74e97d9 TODO.ptrace: Remove entry about addition of TRAP_SCE and TRAP_SCX
These siginfo(2) codes have been committed.
2017-03-03 07:11:49 +00:00
kamil
5147fe4e0c Add new entry in TODO.ptrace about QPassSignals
Added:
   support QPassSignals (PT_SET_SIGPASS/PT_GET_SIGPASS) in the kernel, a way to
   stop routing a set of signals to tracer as they are uninteresting - GDB and
   LLDB expect this feature
2017-03-03 07:03:11 +00:00
kamil
e663963d4a Add new entry in TODO.ptrace about PT_STEP with a signal
Added:
  GDB Remote Protocol expects a case with a step with a signal to be sent,
  this is currently unsupported on NetBSD
2017-03-02 14:25:41 +00:00
kamil
08e976c813 Sync TODO.ptrace with reality
Remove entries:
- add new ptrace(2) calls to lock (suspend) and unlock LWP within a process
- switch PT_WATCHPOINT* to PT_*ETDBREGS and document it, add ATF tests
- add ATF tests for PT_SYSCALL and PT_SYSCALLEMU

Sponsored by <The NetBSD Foundation>
2017-02-28 13:10:54 +00:00
kamil
fcb607706d Add new entry to TODO.ptrace
check 64-bit debugger on 64-bit kernel tracing capabilities of 32-bit tracee

Sponsored by <The NetBSD Foundation>
2017-02-20 03:37:24 +00:00
kamil
77487779db Add new entry in TODO.ptrace
Research kgdb. It should be supported by GDB and LLDB.

Sponsored by <The NetBSD Foundation>
2017-02-17 21:22:02 +00:00
kamil
580fd0b4d4 Add new entry to TODO.ptrace
research ipkdb(4)

Sponsored by <The NetBSD Foundation>
2017-02-14 18:38:07 +00:00
kamil
21bd4b20ec Update TODO.ptrace
Note BSD4.4-like /proc debugging removal
Explain kevent(2)-based debugging proposal

Sponsored by <The NetBSD Foundation>
2017-02-13 15:29:18 +00:00
kamil
16420f8cb8 Update TODO.ptrace
Remove:
 - add PT_SET_SIGMASK and PT_GET_SIGMASK - used by checkpointing software

This interface has been committed to HEAD.

Sponsored by <The NetBSD Foundation>
2017-02-12 06:16:33 +00:00
kamil
ac46406cfc Update TODO.ptrace with new entries
Added entries:
 - add support to read debugger events via a file descriptor in procfs
   (kevent(2)), it's still useful in cases when a parent traces tracee and has
   to call waitpid(2) for its child - as this clashes with GUI toolkits
 - fix more calls for netbsd32 compat

Sponsored by <The NetBSD Foundation>
2017-02-12 05:21:34 +00:00
kamil
cbfedeb94c Update TODO.ptrace
Remove entries:
 - remove exect(3) from libc - there is no usecase for it

Interface has been marked obsolete and it's on the queue to be removed for.

 - research what happens when a tracee masks signals (including SIGTRAP) and a
   breakpoint is triggered

It has been researched and ATF tests added (signal1 .. signal10).
It's currently broken on NetBSD.

Add:
 - research support PT_SYSCALL & PT_STEP combined like in Linux

There are circumstances when we want to sstep and catch syscall events.

Sponsored by <The NetBSD Foundation>
2017-02-11 19:10:04 +00:00
kamil
cf07270509 Add new entry in TODO.ptrace
Added:
    add PT_SET_SIGMASK and PT_GET_SIGMASK - used by checkpointing software

Example software: gdb, criu
2017-02-08 14:53:50 +00:00
kamil
0892a29a1a libpthread_dbg(3) deletion from the base distribution
libpthread_dbg(3) is a remnant library from the M:N thread model
(pre-NetBSD-5.0) API to introspect threads within a process and for use
of debuggers.

Currently in the 1:1 model it's not used in GDB neither in LLDB and it's
not either planned to be used. It's current function to read pthread_t
structures is realizable within a regular debugger capable to
instrospect objects within a tracee (GDB, LLDB...).

Remaining users of this API can still use this library from
pkgsrc/devel/libpthread_dbg.

Sponsored by <The NetBSD Foundation>
2017-02-08 03:44:40 +00:00
kamil
edc4b9f5d5 Update TODO.ptrace
Note PT_WATCHPOINT change to PT_*ETDBREGS.
Remove GDB and LLDB related entries from generic ptrace(2) TODO.
Note need for TRAP_SCE and TRAP_SCX si_codes in PT_SYSCALL*.
Note removal request of pthread_dbg(3).

Sponsord by <The NetBSD Foundation>
2017-02-07 16:15:05 +00:00
kamil
8943353e76 Update TODO.ptrace
Added:
 - reiterate over FreeBSD tests and add missing ones if applicable

Sponsored by <The NetBSD Foundation>
2017-01-26 01:12:13 +00:00
kamil
a55086ec09 Update TODO.ptrace
Drop:
 - add ATF tests for PIOD_READ_AUXV

Add new entry:
 - research what happens when a tracee masks signals (including SIGTRAP)
   and a breakpoint is triggered

Sponsored by <The NetBSD Foundation>
2017-01-26 01:04:23 +00:00
kamil
89ada74077 Update TODO.ptrace
Removed:
  - evaluate equivalent for PTRACE_O_TRACECLONE from Linux

clone(2)-like calls are traced with PTRACE_FORK, PTRACE_VFORK and
PTRACE_VFORK_DONE. VFORK ones block parent till termination or execve(2) of
its child.

Added:
  - add proper implementation of PTRACE_VFORK for vfork(2)-like events

Currently PTRACE_VFORK is a stub.

Sponsored by <The NetBSD Foundation>
2017-01-14 01:36:28 +00:00
kamil
50603fe4db Update TODO.ptrace
1. siginfo_t accessors done
2. PTRACE_O_TRACEEXIT not applicable for NetBSD as we are tracing the whole
process at once, not per thread
3. PTRACE_O_TRACEEXEC implemented as SIGTRAP & TRAP_EXEC

Sponsored by <The NetBSD Foundation>
2017-01-08 04:27:36 +00:00
kamil
22020a14fa Update TODO.ptrace
Mark exect(3) for removal, there is no use-case for it. exec() is already
monitored and emits SIGTRAP when traced.

Accessor for siginfo_t is not case for PT_IO -- it's not reading/writing
process space of other process, but shared kernel space.
2016-12-31 20:57:15 +00:00
kamil
228925b54a Add new entry in TODO.ptrace
+ add support to read and write siginfo_t from and to tracee (reuse PT_IO?)

Sponsored by <The NetBSD Foundation>
2016-12-26 08:43:55 +00:00
kamil
c3bf78f467 Add new entry in TODO.ptrace
+ add ATF tests for PT_SYSCALL and PT_SYSCALLEMU

Sponsored by <The NetBSD Foundation>
2016-12-26 03:24:11 +00:00
kamil
38743855a4 Add new entry in TODO.ptrace
New entry:
 - add ATF tests for SIGCHLD
2016-12-24 05:43:31 +00:00
kamil
16960c1506 TODO.ptrace: Update notes about MD documentation
Currently all the MD interfaces are documented, remove this line from TODO.
Add new note:
    once the API for hardware watchpoints will stabilize, document it

Sponsored by <The NetBSD Foundation>
2016-12-19 03:19:37 +00:00
kamil
41a57597c7 Update TODO.ptrace with recent changes
Hardware assisted breakpoint/watchpoint API has been merged with current.

Add note about pthread_dbg(3) API needed to be refactored and limited to
querying POSIX thread private data fields.

Sponsored by <The NetBSD Foundation>
2016-12-15 12:42:38 +00:00
kamil
1eb14748db Add new entries to TODO.ptrace
- add support for detecting equivalent events to PTRACE_O_TRACEEXEC,
   PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXIT from Linux
 - exect(3) rething or remove -- maybe PT_TRACE_ME + PTRACE_O_TRACEEXEC?

Sponsored by <The NetBSD Foundation>
2016-12-15 07:47:08 +00:00
kamil
6d08a581a0 Update TODO.ptrace
Add new entries:
 - add support for PT_STEP, PT_GETREGS, PT_SETREGS, PT_GETFPREGS,
   PT_SETFPREGS in all ports
 - integrate all ptrace(2) features in gdb
 - add ptrace(2) NetBSD support in LLDB

Sponsored by <The NetBSD Foundation>
2016-12-14 06:26:04 +00:00
kamil
6c52405165 Add initial TODO list for the ptrace(2) (and procfs) interface.
Sponsored by <The NetBSD Foundation>
2016-12-13 09:44:35 +00:00