mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
6eeb5c5531
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's stopped_by_watchpoint and stopped_data_address ops into methods of process_target. * target.h (struct process_stratum_target): Remove the target ops. (class process_target): Add the target ops. * target.cc (process_target::stopped_by_watchpoint): Define. (process_target::stopped_data_address): Define. Update the derived classes and callers below. * remote-utils.cc (prepare_resume_reply): Update. * linux-low.cc (linux_target_ops): Update. (linux_stopped_by_watchpoint): Turn into ... (linux_process_target::stopped_by_watchpoint): ... this. (linux_stopped_data_address): Turn into ... (linux_process_target::stopped_data_address): ... this. * linux-low.h (class linux_process_target): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. (nto_stopped_by_watchpoint): Turn into ... (nto_process_target::stopped_by_watchpoint): ... this. (nto_stopped_data_address): Turn into ... (nto_process_target::stopped_data_address): ... this. * nto-low.h (class nto_process_target): Update. * win32-low.cc (win32_target_ops): Update. (win32_stopped_by_watchpoint): Turn into ... (win32_process_target::stopped_by_watchpoint): ... this. (win32_stopped_data_address): Turn into ... (win32_process_target::stopped_data_address): ... this. * win32-low.h (class win32_process_target): Update.
108 lines
2.9 KiB
C++
108 lines
2.9 KiB
C++
/* Internal interfaces for the QNX Neutrino specific target code for gdbserver.
|
|
Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef GDBSERVER_NTO_LOW_H
|
|
#define GDBSERVER_NTO_LOW_H
|
|
|
|
struct target_desc;
|
|
|
|
enum regset_type
|
|
{
|
|
NTO_REG_GENERAL,
|
|
NTO_REG_FLOAT,
|
|
NTO_REG_SYSTEM,
|
|
NTO_REG_ALT,
|
|
NTO_REG_END
|
|
};
|
|
|
|
struct nto_target_ops
|
|
{
|
|
/* Architecture specific setup. */
|
|
void (*arch_setup) (void);
|
|
int num_regs;
|
|
int (*register_offset) (int gdbregno);
|
|
const unsigned char *breakpoint;
|
|
int breakpoint_len;
|
|
};
|
|
|
|
extern struct nto_target_ops the_low_target;
|
|
|
|
/* Target ops definitions for a QNX Neutrino target. */
|
|
|
|
class nto_process_target : public process_target
|
|
{
|
|
public:
|
|
|
|
int create_inferior (const char *program,
|
|
const std::vector<char *> &program_args) override;
|
|
|
|
int attach (unsigned long pid) override;
|
|
|
|
int kill (process_info *proc) override;
|
|
|
|
int detach (process_info *proc) override;
|
|
|
|
void mourn (process_info *proc) override;
|
|
|
|
void join (int pid) override;
|
|
|
|
bool thread_alive (ptid_t pid) override;
|
|
|
|
void resume (thread_resume *resume_info, size_t n) override;
|
|
|
|
ptid_t wait (ptid_t ptid, target_waitstatus *status,
|
|
int options) override;
|
|
|
|
void fetch_registers (regcache *regcache, int regno) override;
|
|
|
|
void store_registers (regcache *regcache, int regno) override;
|
|
|
|
int read_memory (CORE_ADDR memaddr, unsigned char *myaddr,
|
|
int len) override;
|
|
|
|
int write_memory (CORE_ADDR memaddr, const unsigned char *myaddr,
|
|
int len) override;
|
|
|
|
void request_interrupt () override;
|
|
|
|
bool supports_read_auxv () override;
|
|
|
|
int read_auxv (CORE_ADDR offset, unsigned char *myaddr,
|
|
unsigned int len) override;
|
|
|
|
bool supports_z_point_type (char z_type) override;
|
|
|
|
int insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
|
int size, raw_breakpoint *bp) override;
|
|
|
|
int remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
|
int size, raw_breakpoint *bp) override;
|
|
|
|
bool supports_hardware_single_step () override;
|
|
|
|
bool stopped_by_watchpoint () override;
|
|
|
|
CORE_ADDR stopped_data_address () override;
|
|
};
|
|
|
|
/* The inferior's target description. This is a global because the
|
|
LynxOS ports support neither bi-arch nor multi-process. */
|
|
extern const struct target_desc *nto_tdesc;
|
|
|
|
#endif /* GDBSERVER_NTO_LOW_H */
|