1 /* GNU/Linux/ARM specific low level interface, for the remote server for GDB.
2 Copyright (C) 1995-2014 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #include "linux-low.h"
22 /* Don't include elf.h if linux/elf.h got included by gdb_proc_service.h.
23 On Bionic elf.h and linux/elf.h have conflicting definitions. */
27 #include <sys/ptrace.h>
30 /* Defined in auto-generated files. */
31 void init_registers_arm (void);
32 extern const struct target_desc
*tdesc_arm
;
34 void init_registers_arm_with_iwmmxt (void);
35 extern const struct target_desc
*tdesc_arm_with_iwmmxt
;
37 void init_registers_arm_with_vfpv2 (void);
38 extern const struct target_desc
*tdesc_arm_with_vfpv2
;
40 void init_registers_arm_with_vfpv3 (void);
41 extern const struct target_desc
*tdesc_arm_with_vfpv3
;
43 void init_registers_arm_with_neon (void);
44 extern const struct target_desc
*tdesc_arm_with_neon
;
46 #ifndef PTRACE_GET_THREAD_AREA
47 #define PTRACE_GET_THREAD_AREA 22
50 #ifndef PTRACE_GETWMMXREGS
51 # define PTRACE_GETWMMXREGS 18
52 # define PTRACE_SETWMMXREGS 19
55 #ifndef PTRACE_GETVFPREGS
56 # define PTRACE_GETVFPREGS 27
57 # define PTRACE_SETVFPREGS 28
60 #ifndef PTRACE_GETHBPREGS
61 #define PTRACE_GETHBPREGS 29
62 #define PTRACE_SETHBPREGS 30
65 /* Information describing the hardware breakpoint capabilities. */
69 unsigned char max_wp_length
;
70 unsigned char wp_count
;
71 unsigned char bp_count
;
74 /* Enum describing the different types of ARM hardware break-/watch-points. */
83 /* Type describing an ARM Hardware Breakpoint Control register value. */
84 typedef unsigned int arm_hwbp_control_t
;
86 /* Structure used to keep track of hardware break-/watch-points. */
87 struct arm_linux_hw_breakpoint
89 /* Address to break on, or being watched. */
91 /* Control register for break-/watch- point. */
92 arm_hwbp_control_t control
;
95 /* Since we cannot dynamically allocate subfields of arch_process_info,
96 assume a maximum number of supported break-/watchpoints. */
100 /* Per-process arch-specific data we want to keep. */
101 struct arch_process_info
103 /* Hardware breakpoints for this process. */
104 struct arm_linux_hw_breakpoint bpts
[MAX_BPTS
];
105 /* Hardware watchpoints for this process. */
106 struct arm_linux_hw_breakpoint wpts
[MAX_WPTS
];
109 /* Per-thread arch-specific data we want to keep. */
112 /* Non-zero if our copy differs from what's recorded in the thread. */
113 char bpts_changed
[MAX_BPTS
];
114 char wpts_changed
[MAX_WPTS
];
115 /* Cached stopped data address. */
116 CORE_ADDR stopped_data_address
;
119 static unsigned long arm_hwcap
;
121 /* These are in <asm/elf.h> in current kernels. */
123 #define HWCAP_IWMMXT 512
124 #define HWCAP_NEON 4096
125 #define HWCAP_VFPv3 8192
126 #define HWCAP_VFPv3D16 16384
128 #ifdef HAVE_SYS_REG_H
132 #define arm_num_regs 26
134 static int arm_regmap
[] = {
135 0, 4, 8, 12, 16, 20, 24, 28,
136 32, 36, 40, 44, 48, 52, 56, 60,
137 -1, -1, -1, -1, -1, -1, -1, -1, -1,
142 arm_cannot_store_register (int regno
)
144 return (regno
>= arm_num_regs
);
148 arm_cannot_fetch_register (int regno
)
150 return (regno
>= arm_num_regs
);
154 arm_fill_gregset (struct regcache
*regcache
, void *buf
)
158 for (i
= 0; i
< arm_num_regs
; i
++)
159 if (arm_regmap
[i
] != -1)
160 collect_register (regcache
, i
, ((char *) buf
) + arm_regmap
[i
]);
164 arm_store_gregset (struct regcache
*regcache
, const void *buf
)
169 memset (zerobuf
, 0, 8);
170 for (i
= 0; i
< arm_num_regs
; i
++)
171 if (arm_regmap
[i
] != -1)
172 supply_register (regcache
, i
, ((char *) buf
) + arm_regmap
[i
]);
174 supply_register (regcache
, i
, zerobuf
);
178 arm_fill_wmmxregset (struct regcache
*regcache
, void *buf
)
182 if (!(arm_hwcap
& HWCAP_IWMMXT
))
185 for (i
= 0; i
< 16; i
++)
186 collect_register (regcache
, arm_num_regs
+ i
, (char *) buf
+ i
* 8);
188 /* We only have access to wcssf, wcasf, and wcgr0-wcgr3. */
189 for (i
= 0; i
< 6; i
++)
190 collect_register (regcache
, arm_num_regs
+ i
+ 16,
191 (char *) buf
+ 16 * 8 + i
* 4);
195 arm_store_wmmxregset (struct regcache
*regcache
, const void *buf
)
199 if (!(arm_hwcap
& HWCAP_IWMMXT
))
202 for (i
= 0; i
< 16; i
++)
203 supply_register (regcache
, arm_num_regs
+ i
, (char *) buf
+ i
* 8);
205 /* We only have access to wcssf, wcasf, and wcgr0-wcgr3. */
206 for (i
= 0; i
< 6; i
++)
207 supply_register (regcache
, arm_num_regs
+ i
+ 16,
208 (char *) buf
+ 16 * 8 + i
* 4);
212 arm_fill_vfpregset (struct regcache
*regcache
, void *buf
)
216 if (!(arm_hwcap
& HWCAP_VFP
))
219 if ((arm_hwcap
& (HWCAP_VFPv3
| HWCAP_VFPv3D16
)) == HWCAP_VFPv3
)
224 base
= find_regno (regcache
->tdesc
, "d0");
225 for (i
= 0; i
< num
; i
++)
226 collect_register (regcache
, base
+ i
, (char *) buf
+ i
* 8);
228 collect_register_by_name (regcache
, "fpscr", (char *) buf
+ 32 * 8);
232 arm_store_vfpregset (struct regcache
*regcache
, const void *buf
)
236 if (!(arm_hwcap
& HWCAP_VFP
))
239 if ((arm_hwcap
& (HWCAP_VFPv3
| HWCAP_VFPv3D16
)) == HWCAP_VFPv3
)
244 base
= find_regno (regcache
->tdesc
, "d0");
245 for (i
= 0; i
< num
; i
++)
246 supply_register (regcache
, base
+ i
, (char *) buf
+ i
* 8);
248 supply_register_by_name (regcache
, "fpscr", (char *) buf
+ 32 * 8);
251 extern int debug_threads
;
254 arm_get_pc (struct regcache
*regcache
)
257 collect_register_by_name (regcache
, "pc", &pc
);
259 debug_printf ("stop pc is %08lx\n", pc
);
264 arm_set_pc (struct regcache
*regcache
, CORE_ADDR pc
)
266 unsigned long newpc
= pc
;
267 supply_register_by_name (regcache
, "pc", &newpc
);
270 /* Correct in either endianness. */
271 static const unsigned long arm_breakpoint
= 0xef9f0001;
272 #define arm_breakpoint_len 4
273 static const unsigned short thumb_breakpoint
= 0xde01;
274 static const unsigned short thumb2_breakpoint
[] = { 0xf7f0, 0xa000 };
276 /* For new EABI binaries. We recognize it regardless of which ABI
277 is used for gdbserver, so single threaded debugging should work
278 OK, but for multi-threaded debugging we only insert the current
279 ABI's breakpoint instruction. For now at least. */
280 static const unsigned long arm_eabi_breakpoint
= 0xe7f001f0;
283 arm_breakpoint_at (CORE_ADDR where
)
285 struct regcache
*regcache
= get_thread_regcache (current_inferior
, 1);
288 collect_register_by_name (regcache
, "cpsr", &cpsr
);
295 (*the_target
->read_memory
) (where
, (unsigned char *) &insn
, 2);
296 if (insn
== thumb_breakpoint
)
299 if (insn
== thumb2_breakpoint
[0])
301 (*the_target
->read_memory
) (where
+ 2, (unsigned char *) &insn
, 2);
302 if (insn
== thumb2_breakpoint
[1])
311 (*the_target
->read_memory
) (where
, (unsigned char *) &insn
, 4);
312 if (insn
== arm_breakpoint
)
315 if (insn
== arm_eabi_breakpoint
)
322 /* We only place breakpoints in empty marker functions, and thread locking
323 is outside of the function. So rather than importing software single-step,
324 we can just run until exit. */
326 arm_reinsert_addr (void)
328 struct regcache
*regcache
= get_thread_regcache (current_inferior
, 1);
330 collect_register_by_name (regcache
, "lr", &pc
);
334 /* Fetch the thread-local storage pointer for libthread_db. */
337 ps_get_thread_area (const struct ps_prochandle
*ph
,
338 lwpid_t lwpid
, int idx
, void **base
)
340 if (ptrace (PTRACE_GET_THREAD_AREA
, lwpid
, NULL
, base
) != 0)
343 /* IDX is the bias from the thread pointer to the beginning of the
344 thread descriptor. It has to be subtracted due to implementation
345 quirks in libthread_db. */
346 *base
= (void *) ((char *)*base
- idx
);
352 /* Query Hardware Breakpoint information for the target we are attached to
353 (using PID as ptrace argument) and set up arm_linux_hwbp_cap. */
355 arm_linux_init_hwbp_cap (int pid
)
359 if (ptrace (PTRACE_GETHBPREGS
, pid
, 0, &val
) < 0)
362 arm_linux_hwbp_cap
.arch
= (unsigned char)((val
>> 24) & 0xff);
363 if (arm_linux_hwbp_cap
.arch
== 0)
366 arm_linux_hwbp_cap
.max_wp_length
= (unsigned char)((val
>> 16) & 0xff);
367 arm_linux_hwbp_cap
.wp_count
= (unsigned char)((val
>> 8) & 0xff);
368 arm_linux_hwbp_cap
.bp_count
= (unsigned char)(val
& 0xff);
370 if (arm_linux_hwbp_cap
.wp_count
> MAX_WPTS
)
371 internal_error (__FILE__
, __LINE__
, "Unsupported number of watchpoints");
372 if (arm_linux_hwbp_cap
.bp_count
> MAX_BPTS
)
373 internal_error (__FILE__
, __LINE__
, "Unsupported number of breakpoints");
376 /* How many hardware breakpoints are available? */
378 arm_linux_get_hw_breakpoint_count (void)
380 return arm_linux_hwbp_cap
.bp_count
;
383 /* How many hardware watchpoints are available? */
385 arm_linux_get_hw_watchpoint_count (void)
387 return arm_linux_hwbp_cap
.wp_count
;
390 /* Maximum length of area watched by hardware watchpoint. */
392 arm_linux_get_hw_watchpoint_max_length (void)
394 return arm_linux_hwbp_cap
.max_wp_length
;
397 /* Initialize an ARM hardware break-/watch-point control register value.
398 BYTE_ADDRESS_SELECT is the mask of bytes to trigger on; HWBP_TYPE is the
399 type of break-/watch-point; ENABLE indicates whether the point is enabled.
401 static arm_hwbp_control_t
402 arm_hwbp_control_initialize (unsigned byte_address_select
,
403 arm_hwbp_type hwbp_type
,
406 gdb_assert ((byte_address_select
& ~0xffU
) == 0);
407 gdb_assert (hwbp_type
!= arm_hwbp_break
408 || ((byte_address_select
& 0xfU
) != 0));
410 return (byte_address_select
<< 5) | (hwbp_type
<< 3) | (3 << 1) | enable
;
413 /* Does the breakpoint control value CONTROL have the enable bit set? */
415 arm_hwbp_control_is_enabled (arm_hwbp_control_t control
)
417 return control
& 0x1;
420 /* Is the breakpoint control value CONTROL initialized? */
422 arm_hwbp_control_is_initialized (arm_hwbp_control_t control
)
427 /* Change a breakpoint control word so that it is in the disabled state. */
428 static arm_hwbp_control_t
429 arm_hwbp_control_disable (arm_hwbp_control_t control
)
431 return control
& ~0x1;
434 /* Are two break-/watch-points equal? */
436 arm_linux_hw_breakpoint_equal (const struct arm_linux_hw_breakpoint
*p1
,
437 const struct arm_linux_hw_breakpoint
*p2
)
439 return p1
->address
== p2
->address
&& p1
->control
== p2
->control
;
442 /* Initialize the hardware breakpoint structure P for a breakpoint or
443 watchpoint at ADDR to LEN. The type of watchpoint is given in TYPE.
444 Returns -1 if TYPE is unsupported, or -2 if the particular combination
445 of ADDR and LEN cannot be implemented. Otherwise, returns 0 if TYPE
446 represents a breakpoint and 1 if type represents a watchpoint. */
448 arm_linux_hw_point_initialize (char type
, CORE_ADDR addr
, int len
,
449 struct arm_linux_hw_breakpoint
*p
)
451 arm_hwbp_type hwbp_type
;
454 /* Breakpoint/watchpoint types (GDB terminology):
455 0 = memory breakpoint for instructions
456 (not supported; done via memory write instead)
457 1 = hardware breakpoint for instructions (supported)
458 2 = write watchpoint (supported)
459 3 = read watchpoint (supported)
460 4 = access watchpoint (supported). */
464 hwbp_type
= arm_hwbp_break
;
467 hwbp_type
= arm_hwbp_store
;
470 hwbp_type
= arm_hwbp_load
;
473 hwbp_type
= arm_hwbp_access
;
480 if (hwbp_type
== arm_hwbp_break
)
482 /* For breakpoints, the length field encodes the mode. */
485 case 2: /* 16-bit Thumb mode breakpoint */
486 case 3: /* 32-bit Thumb mode breakpoint */
490 case 4: /* 32-bit ARM mode breakpoint */
501 CORE_ADDR max_wp_length
= arm_linux_get_hw_watchpoint_max_length ();
502 CORE_ADDR aligned_addr
;
504 /* Can not set watchpoints for zero or negative lengths. */
507 /* The current ptrace interface can only handle watchpoints that are a
509 if ((len
& (len
- 1)) != 0)
512 /* Test that the range [ADDR, ADDR + LEN) fits into the largest address
513 range covered by a watchpoint. */
514 aligned_addr
= addr
& ~(max_wp_length
- 1);
515 if (aligned_addr
+ max_wp_length
< addr
+ len
)
518 mask
= (1 << len
) - 1;
521 p
->address
= (unsigned int) addr
;
522 p
->control
= arm_hwbp_control_initialize (mask
, hwbp_type
, 1);
524 return hwbp_type
!= arm_hwbp_break
;
527 /* Callback to mark a watch-/breakpoint to be updated in all threads of
528 the current process. */
530 struct update_registers_data
537 update_registers_callback (struct inferior_list_entry
*entry
, void *arg
)
539 struct thread_info
*thread
= (struct thread_info
*) entry
;
540 struct lwp_info
*lwp
= get_thread_lwp (thread
);
541 struct update_registers_data
*data
= (struct update_registers_data
*) arg
;
543 /* Only update the threads of the current process. */
544 if (pid_of (thread
) == pid_of (current_inferior
))
546 /* The actual update is done later just before resuming the lwp,
547 we just mark that the registers need updating. */
549 lwp
->arch_private
->wpts_changed
[data
->i
] = 1;
551 lwp
->arch_private
->bpts_changed
[data
->i
] = 1;
553 /* If the lwp isn't stopped, force it to momentarily pause, so
554 we can update its breakpoint registers. */
556 linux_stop_lwp (lwp
);
562 /* Insert hardware break-/watchpoint. */
564 arm_insert_point (char type
, CORE_ADDR addr
, int len
)
566 struct process_info
*proc
= current_process ();
567 struct arm_linux_hw_breakpoint p
, *pts
;
570 watch
= arm_linux_hw_point_initialize (type
, addr
, len
, &p
);
574 return watch
== -1 ? 1 : -1;
579 count
= arm_linux_get_hw_watchpoint_count ();
580 pts
= proc
->private->arch_private
->wpts
;
584 count
= arm_linux_get_hw_breakpoint_count ();
585 pts
= proc
->private->arch_private
->bpts
;
588 for (i
= 0; i
< count
; i
++)
589 if (!arm_hwbp_control_is_enabled (pts
[i
].control
))
591 struct update_registers_data data
= { watch
, i
};
593 find_inferior (&all_threads
, update_registers_callback
, &data
);
597 /* We're out of watchpoints. */
601 /* Remove hardware break-/watchpoint. */
603 arm_remove_point (char type
, CORE_ADDR addr
, int len
)
605 struct process_info
*proc
= current_process ();
606 struct arm_linux_hw_breakpoint p
, *pts
;
609 watch
= arm_linux_hw_point_initialize (type
, addr
, len
, &p
);
618 count
= arm_linux_get_hw_watchpoint_count ();
619 pts
= proc
->private->arch_private
->wpts
;
623 count
= arm_linux_get_hw_breakpoint_count ();
624 pts
= proc
->private->arch_private
->bpts
;
627 for (i
= 0; i
< count
; i
++)
628 if (arm_linux_hw_breakpoint_equal (&p
, pts
+ i
))
630 struct update_registers_data data
= { watch
, i
};
631 pts
[i
].control
= arm_hwbp_control_disable (pts
[i
].control
);
632 find_inferior (&all_threads
, update_registers_callback
, &data
);
636 /* No watchpoint matched. */
640 /* Return whether current thread is stopped due to a watchpoint. */
642 arm_stopped_by_watchpoint (void)
644 struct lwp_info
*lwp
= get_thread_lwp (current_inferior
);
647 /* We must be able to set hardware watchpoints. */
648 if (arm_linux_get_hw_watchpoint_count () == 0)
651 /* Retrieve siginfo. */
653 ptrace (PTRACE_GETSIGINFO
, lwpid_of (current_inferior
), 0, &siginfo
);
657 /* This must be a hardware breakpoint. */
658 if (siginfo
.si_signo
!= SIGTRAP
659 || (siginfo
.si_code
& 0xffff) != 0x0004 /* TRAP_HWBKPT */)
662 /* If we are in a positive slot then we're looking at a breakpoint and not
664 if (siginfo
.si_errno
>= 0)
667 /* Cache stopped data address for use by arm_stopped_data_address. */
668 lwp
->arch_private
->stopped_data_address
669 = (CORE_ADDR
) (uintptr_t) siginfo
.si_addr
;
674 /* Return data address that triggered watchpoint. Called only if
675 arm_stopped_by_watchpoint returned true. */
677 arm_stopped_data_address (void)
679 struct lwp_info
*lwp
= get_thread_lwp (current_inferior
);
680 return lwp
->arch_private
->stopped_data_address
;
683 /* Called when a new process is created. */
684 static struct arch_process_info
*
685 arm_new_process (void)
687 struct arch_process_info
*info
= xcalloc (1, sizeof (*info
));
691 /* Called when a new thread is detected. */
692 static struct arch_lwp_info
*
693 arm_new_thread (void)
695 struct arch_lwp_info
*info
= xcalloc (1, sizeof (*info
));
698 for (i
= 0; i
< MAX_BPTS
; i
++)
699 info
->bpts_changed
[i
] = 1;
700 for (i
= 0; i
< MAX_WPTS
; i
++)
701 info
->wpts_changed
[i
] = 1;
706 /* Called when resuming a thread.
707 If the debug regs have changed, update the thread's copies. */
709 arm_prepare_to_resume (struct lwp_info
*lwp
)
711 struct thread_info
*thread
= get_lwp_thread (lwp
);
712 int pid
= lwpid_of (thread
);
713 struct process_info
*proc
= find_process_pid (pid_of (thread
));
714 struct arch_process_info
*proc_info
= proc
->private->arch_private
;
715 struct arch_lwp_info
*lwp_info
= lwp
->arch_private
;
718 for (i
= 0; i
< arm_linux_get_hw_breakpoint_count (); i
++)
719 if (lwp_info
->bpts_changed
[i
])
723 if (arm_hwbp_control_is_enabled (proc_info
->bpts
[i
].control
))
724 if (ptrace (PTRACE_SETHBPREGS
, pid
,
725 (PTRACE_TYPE_ARG3
) ((i
<< 1) + 1),
726 &proc_info
->bpts
[i
].address
) < 0)
727 perror_with_name ("Unexpected error setting breakpoint address");
729 if (arm_hwbp_control_is_initialized (proc_info
->bpts
[i
].control
))
730 if (ptrace (PTRACE_SETHBPREGS
, pid
,
731 (PTRACE_TYPE_ARG3
) ((i
<< 1) + 2),
732 &proc_info
->bpts
[i
].control
) < 0)
733 perror_with_name ("Unexpected error setting breakpoint");
735 lwp_info
->bpts_changed
[i
] = 0;
738 for (i
= 0; i
< arm_linux_get_hw_watchpoint_count (); i
++)
739 if (lwp_info
->wpts_changed
[i
])
743 if (arm_hwbp_control_is_enabled (proc_info
->wpts
[i
].control
))
744 if (ptrace (PTRACE_SETHBPREGS
, pid
,
745 (PTRACE_TYPE_ARG3
) -((i
<< 1) + 1),
746 &proc_info
->wpts
[i
].address
) < 0)
747 perror_with_name ("Unexpected error setting watchpoint address");
749 if (arm_hwbp_control_is_initialized (proc_info
->wpts
[i
].control
))
750 if (ptrace (PTRACE_SETHBPREGS
, pid
,
751 (PTRACE_TYPE_ARG3
) -((i
<< 1) + 2),
752 &proc_info
->wpts
[i
].control
) < 0)
753 perror_with_name ("Unexpected error setting watchpoint");
755 lwp_info
->wpts_changed
[i
] = 0;
761 arm_get_hwcap (unsigned long *valp
)
763 unsigned char *data
= alloca (8);
766 while ((*the_target
->read_auxv
) (offset
, data
, 8) == 8)
768 unsigned int *data_p
= (unsigned int *)data
;
769 if (data_p
[0] == AT_HWCAP
)
782 static const struct target_desc
*
783 arm_read_description (void)
785 int pid
= lwpid_of (current_inferior
);
787 /* Query hardware watchpoint/breakpoint capabilities. */
788 arm_linux_init_hwbp_cap (pid
);
791 if (arm_get_hwcap (&arm_hwcap
) == 0)
794 if (arm_hwcap
& HWCAP_IWMMXT
)
795 return tdesc_arm_with_iwmmxt
;
797 if (arm_hwcap
& HWCAP_VFP
)
799 const struct target_desc
*result
;
802 /* NEON implies either no VFP, or VFPv3-D32. We only support
804 if (arm_hwcap
& HWCAP_NEON
)
805 result
= tdesc_arm_with_neon
;
806 else if ((arm_hwcap
& (HWCAP_VFPv3
| HWCAP_VFPv3D16
)) == HWCAP_VFPv3
)
807 result
= tdesc_arm_with_vfpv3
;
809 result
= tdesc_arm_with_vfpv2
;
811 /* Now make sure that the kernel supports reading these
812 registers. Support was added in 2.6.30. */
814 buf
= xmalloc (32 * 8 + 4);
815 if (ptrace (PTRACE_GETVFPREGS
, pid
, 0, buf
) < 0
826 /* The default configuration uses legacy FPA registers, probably
832 arm_arch_setup (void)
834 current_process ()->tdesc
= arm_read_description ();
837 static struct regset_info arm_regsets
[] = {
838 { PTRACE_GETREGS
, PTRACE_SETREGS
, 0, 18 * 4,
840 arm_fill_gregset
, arm_store_gregset
},
841 { PTRACE_GETWMMXREGS
, PTRACE_SETWMMXREGS
, 0, 16 * 8 + 6 * 4,
843 arm_fill_wmmxregset
, arm_store_wmmxregset
},
844 { PTRACE_GETVFPREGS
, PTRACE_SETVFPREGS
, 0, 32 * 8 + 4,
846 arm_fill_vfpregset
, arm_store_vfpregset
},
847 { 0, 0, 0, -1, -1, NULL
, NULL
}
850 static struct regsets_info arm_regsets_info
=
852 arm_regsets
, /* regsets */
854 NULL
, /* disabled_regsets */
857 static struct usrregs_info arm_usrregs_info
=
863 static struct regs_info regs_info
=
865 NULL
, /* regset_bitmap */
870 static const struct regs_info
*
876 struct linux_target_ops the_low_target
= {
879 arm_cannot_fetch_register
,
880 arm_cannot_store_register
,
881 NULL
, /* fetch_register */
885 /* Define an ARM-mode breakpoint; we only set breakpoints in the C
886 library, which is most likely to be ARM. If the kernel supports
887 clone events, we will never insert a breakpoint, so even a Thumb
888 C library will work; so will mixing EABI/non-EABI gdbserver and
891 (const unsigned char *) &arm_breakpoint
,
893 (const unsigned char *) &arm_eabi_breakpoint
,
901 arm_stopped_by_watchpoint
,
902 arm_stopped_data_address
,
903 NULL
, /* collect_ptrace_register */
904 NULL
, /* supply_ptrace_register */
905 NULL
, /* siginfo_fixup */
908 arm_prepare_to_resume
,
912 initialize_low_arch (void)
914 /* Initialize the Linux target descriptions. */
915 init_registers_arm ();
916 init_registers_arm_with_iwmmxt ();
917 init_registers_arm_with_vfpv2 ();
918 init_registers_arm_with_vfpv3 ();
919 init_registers_arm_with_neon ();
921 initialize_regsets_info (&arm_regsets_info
);