#include "arch/ppc-linux-common.h"
#include "arch/ppc-linux-tdesc.h"
#include "nat/ppc-linux.h"
#include "arch/ppc-linux-common.h"
#include "arch/ppc-linux-tdesc.h"
#include "nat/ppc-linux.h"
/* Similarly for the hardware watchpoint support. These requests are used
when the PowerPC HWDEBUG ptrace interface is not available. */
/* Similarly for the hardware watchpoint support. These requests are used
when the PowerPC HWDEBUG ptrace interface is not available. */
if (altivec_register_p (gdbarch, regno))
{
/* If this is the first time through, or if it is not the first
if (altivec_register_p (gdbarch, regno))
{
/* If this is the first time through, or if it is not the first
support for such a ptrace request, then go and fetch the
register. */
if (have_ptrace_getvrregs)
support for such a ptrace request, then go and fetch the
register. */
if (have_ptrace_getvrregs)
general-purpose registers and its SPE-specific registers to the
values in EVRREGSET. If we don't support PTRACE_SETEVRREGS, do
nothing.
general-purpose registers and its SPE-specific registers to the
values in EVRREGSET. If we don't support PTRACE_SETEVRREGS, do
nothing.
-/* This is an internal VEC created to store information about *points inserted
- for each thread. This is used when PowerPC HWDEBUG ptrace interface is
- available. */
-typedef struct thread_points
+/* This is an internal vector created to store information about *points
+ inserted for each thread. This is used when PowerPC HWDEBUG ptrace
+ interface is available. */
+struct thread_points
size of these vector is MAX_SLOTS_NUMBER. If the hw_break element of
the tuple is NULL, then the position in the vector is free. */
struct hw_break_tuple *hw_breaks;
size of these vector is MAX_SLOTS_NUMBER. If the hw_break element of
the tuple is NULL, then the position in the vector is free. */
struct hw_break_tuple *hw_breaks;
static struct thread_points *
hwdebug_find_thread_points_by_tid (int tid, int alloc_new)
{
static struct thread_points *
hwdebug_find_thread_points_by_tid (int tid, int alloc_new)
{
- int i;
- struct thread_points *t;
-
- for (i = 0; VEC_iterate (thread_points_p, ppc_threads, i, t); i++)
- if (t->tid == tid)
- return t;
+ for (thread_points *t : ppc_threads)
+ {
+ if (t->tid == tid)
+ return t;
+ }
t = XNEW (struct thread_points);
t->hw_breaks = XCNEWVEC (struct hw_break_tuple, max_slots_number);
t->tid = tid;
t = XNEW (struct thread_points);
t->hw_breaks = XCNEWVEC (struct hw_break_tuple, max_slots_number);
t->tid = tid;
- if (hw_breaks[i].hw_break == NULL)
- {
- hw_breaks[i].slot = slot;
- hw_breaks[i].hw_break = p.release ();
- break;
- }
+ {
+ if (hw_breaks[i].hw_break == NULL)
+ {
+ hw_breaks[i].slot = slot;
+ hw_breaks[i].hw_break = p.release ();
+ break;
+ }
+ }
- for (i = 0; VEC_iterate (thread_points_p, ppc_threads, i, p); i++)
- if (p->tid == tid)
- {
- t = p;
- break;
- }
+ for (i = 0; i < ppc_threads.size (); i++)
+ {
+ if (ppc_threads[i]->tid == tid)
+ {
+ t = ppc_threads[i];
+ break;
+ }
+ }