Home | History | Annotate | Download | only in tests

Lines Matching refs:state

66 struct state
106 struct state *state = arg;
108 if (regno >= state->nregs)
110 state->info = realloc (state->info, (regno + 1) * sizeof state->info[0]);
111 memset (&state->info[state->nregs], 0,
112 ((void *) &state->info[regno + 1]
113 - (void *) &state->info[state->nregs]));
114 state->nregs = regno + 1;
117 state->info[regno].regno = regno;
118 state->info[regno].set = setname;
119 state->info[regno].pfx = prefix;
120 state->info[regno].bits = bits;
121 state->info[regno].type = type;
122 assert (strlen (regname) < sizeof state->info[regno].name);
123 strcpy (state->info[regno].name, regname);
164 struct state state = { NULL, 0 };
165 int result = dwfl_module_register_names (mod, &one_register, &state);
166 if (result != 0 || state.nregs == 0)
170 qsort (state.info, state.nregs, sizeof state.info[0], &compare);
173 for (int i = 0; i < state.nregs; ++i)
174 if (state.info[i].set != NULL)
176 if (set != state.info[i].set)
177 printf ("%s registers:\n", state.info[i].set);
178 set = state.info[i].set;
181 state.info[i].regno,
182 state.info[i].pfx ?: "", state.info[i].name,
183 state.info[i].name,
184 dwarf_encoding_string (state.info[i].type),
185 state.info[i].bits);
187 free (state.info);