X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdbserver%2Flinux-arm-low.cc;h=fb5b761a833aea343563b3c45770969658b95083;hb=1e92785005ce880a5fac9d022f05cdcff91c3091;hp=78e93d304f505ac77aafd379903fcd5b7690883d;hpb=b35db73327cf54445a20533305fcf705e88a520b;p=deliverable%2Fbinutils-gdb.git diff --git a/gdbserver/linux-arm-low.cc b/gdbserver/linux-arm-low.cc index 78e93d304f..fb5b761a83 100644 --- a/gdbserver/linux-arm-low.cc +++ b/gdbserver/linux-arm-low.cc @@ -72,6 +72,8 @@ public: bool supports_z_point_type (char z_type) override; + bool supports_hardware_single_step () override; + protected: void low_arch_setup () override; @@ -99,6 +101,22 @@ protected: bool low_stopped_by_watchpoint () override; CORE_ADDR low_stopped_data_address () override; + + arch_process_info *low_new_process () override; + + void low_delete_process (arch_process_info *info) override; + + void low_new_thread (lwp_info *) override; + + void low_delete_thread (arch_lwp_info *) override; + + void low_new_fork (process_info *parent, process_info *child) override; + + void low_prepare_to_resume (lwp_info *lwp) override; + + bool low_supports_catch_syscall () override; + + void low_get_syscall_trapinfo (regcache *regcache, int *sysno) override; }; /* The singleton target ops object. */ @@ -719,8 +737,8 @@ arm_target::low_stopped_data_address () } /* Called when a new process is created. */ -static struct arch_process_info * -arm_new_process (void) +arch_process_info * +arm_target::low_new_process () { struct arch_process_info *info = XCNEW (struct arch_process_info); return info; @@ -728,15 +746,15 @@ arm_new_process (void) /* Called when a process is being deleted. */ -static void -arm_delete_process (struct arch_process_info *info) +void +arm_target::low_delete_process (arch_process_info *info) { xfree (info); } /* Called when a new thread is detected. */ -static void -arm_new_thread (struct lwp_info *lwp) +void +arm_target::low_new_thread (lwp_info *lwp) { struct arch_lwp_info *info = XCNEW (struct arch_lwp_info); int i; @@ -751,14 +769,14 @@ arm_new_thread (struct lwp_info *lwp) /* Function to call when a thread is being deleted. */ -static void -arm_delete_thread (struct arch_lwp_info *arch_lwp) +void +arm_target::low_delete_thread (arch_lwp_info *arch_lwp) { xfree (arch_lwp); } -static void -arm_new_fork (struct process_info *parent, struct process_info *child) +void +arm_target::low_new_fork (process_info *parent, process_info *child) { struct arch_process_info *parent_proc_info; struct arch_process_info *child_proc_info; @@ -803,8 +821,8 @@ arm_new_fork (struct process_info *parent, struct process_info *child) /* Called when resuming a thread. If the debug regs have changed, update the thread's copies. */ -static void -arm_prepare_to_resume (struct lwp_info *lwp) +void +arm_target::low_prepare_to_resume (lwp_info *lwp) { struct thread_info *thread = get_lwp_thread (lwp); int pid = lwpid_of (thread); @@ -1018,16 +1036,22 @@ arm_target::low_get_next_pcs (regcache *regcache) /* Support for hardware single step. */ -static int -arm_supports_hardware_single_step (void) +bool +arm_target::supports_hardware_single_step () { - return 0; + return false; } -/* Implementation of linux_target_ops method "get_syscall_trapinfo". */ +bool +arm_target::low_supports_catch_syscall () +{ + return true; +} -static void -arm_get_syscall_trapinfo (struct regcache *regcache, int *sysno) +/* Implementation of linux target ops method "low_get_syscall_trapinfo". */ + +void +arm_target::low_get_syscall_trapinfo (regcache *regcache, int *sysno) { if (arm_is_thumb_mode ()) collect_register_by_name (regcache, "r7", sysno); @@ -1038,7 +1062,7 @@ arm_get_syscall_trapinfo (struct regcache *regcache, int *sysno) collect_register_by_name (regcache, "pc", &pc); - if (the_target->read_memory (pc - 4, (unsigned char *) &insn, 4)) + if (read_memory (pc - 4, (unsigned char *) &insn, 4)) *sysno = UNKNOWN_SYSCALL; else { @@ -1104,25 +1128,6 @@ arm_target::get_regs_info () return ®s_info_arm; } -struct linux_target_ops the_low_target = { - NULL, /* siginfo_fixup */ - arm_new_process, - arm_delete_process, - arm_new_thread, - arm_delete_thread, - arm_new_fork, - arm_prepare_to_resume, - NULL, /* process_qsupported */ - NULL, /* supports_tracepoints */ - NULL, /* get_thread_area */ - NULL, /* install_fast_tracepoint_jump_pad */ - NULL, /* emit_ops */ - NULL, /* get_min_fast_tracepoint_insn_len */ - NULL, /* supports_range_stepping */ - arm_supports_hardware_single_step, - arm_get_syscall_trapinfo, -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_arm_target;