netbsd-nat.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Native-dependent code for NetBSD.
  2. Copyright (C) 2006-2022 Free Software Foundation, Inc.
  3. This file is part of GDB.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. #ifndef NBSD_NAT_H
  15. #define NBSD_NAT_H
  16. #include "inf-ptrace.h"
  17. struct thread_info;
  18. /* A prototype NetBSD target. */
  19. struct nbsd_nat_target : public inf_ptrace_target
  20. {
  21. char *pid_to_exec_file (int pid) override;
  22. bool thread_alive (ptid_t ptid) override;
  23. const char *thread_name (struct thread_info *thr) override;
  24. void post_attach (int pid) override;
  25. void update_thread_list () override;
  26. std::string pid_to_str (ptid_t ptid) override;
  27. int find_memory_regions (find_memory_region_ftype func, void *data) override;
  28. bool info_proc (const char *, enum info_proc_what) override;
  29. void resume (ptid_t, int, enum gdb_signal) override;
  30. ptid_t wait (ptid_t, struct target_waitstatus *, target_wait_flags) override;
  31. int insert_exec_catchpoint (int pid) override;
  32. int remove_exec_catchpoint (int pid) override;
  33. int set_syscall_catchpoint (int pid, bool needed, int any_count,
  34. gdb::array_view<const int> syscall_counts)
  35. override;
  36. bool supports_multi_process () override;
  37. enum target_xfer_status xfer_partial (enum target_object object,
  38. const char *annex,
  39. gdb_byte *readbuf,
  40. const gdb_byte *writebuf,
  41. ULONGEST offset, ULONGEST len,
  42. ULONGEST *xfered_len) override;
  43. bool supports_dumpcore () override;
  44. void dumpcore (const char *filename) override;
  45. protected:
  46. void post_startup_inferior (ptid_t ptid) override;
  47. };
  48. #endif /* netbsd-nat.h */