delve/pkg/proc/native/proc_freebsd.h
Alessandro Arzilli e95ae9c21b
proc,terminal: read command line of new processes (#3346)
Read the command line of the main target process as well as any other
process Delve attaches to in follow exec mode.
The command line can be viewed using the 'target list' command.

In follow exec mode this command line is used to match the follow exec
regex to decide whether or not to attach to a child process.

On macOS or when using rr the list of arguments is not available for
attached processes since there is no way to use the gdb serial protocol
to read it.

Fixes #2242
2023-05-09 11:40:00 -07:00

10 lines
222 B
C

#include <sys/types.h>
#include <sys/user.h>
#include <libutil.h>
#include <libprocstat.h>
char * find_command_name(int pid);
char * find_executable(int pid);
int find_status(int pid);
uintptr_t get_entry_point(int pid);