Home | History | Annotate | Download | only in tests

Lines Matching refs:state

92 struct state
132 struct state *state = arg;
134 if (regno >= state->nregs)
136 state->info = realloc (state->info, (regno + 1) * sizeof state->info[0]);
137 memset (&state->info[state->nregs], 0,
138 ((void *) &state->info[regno + 1]
139 - (void *) &state->info[state->nregs]));
140 state->nregs = regno + 1;
143 state->info[regno].regno = regno;
144 state->info[regno].set = setname;
145 state->info[regno].pfx = prefix;
146 state->info[regno].bits = bits;
147 state->info[regno].type = type;
148 assert (strlen (regname) < sizeof state->info[regno].name);
149 strcpy (state->info[regno].name, regname);
190 struct state state = { NULL, 0 };
191 int result = dwfl_module_register_names (mod, &one_register, &state);
192 if (result != 0 || state.nregs == 0)
196 qsort (state.info, state.nregs, sizeof state.info[0], &compare);
199 for (int i = 0; i < state.nregs; ++i)
200 if (state.info[i].set != NULL)
202 if (set != state.info[i].set)
203 printf ("%s registers:\n", state.info[i].set);
204 set = state.info[i].set;
207 state.info[i].regno,
208 state.info[i].pfx ?: "", state.info[i].name,
209 state.info[i].name,
210 dwarf_encoding_string (state.info[i].type),
211 state.info[i].bits);