IRQ tables, trap tables and softirq tables can grow. The copy mechanism for
these is not correct when saving/restoring state, because it uses always the
name table size (which grows) to copy the saved/restored state snapshots.
We should change the g_new allocations for g_arrays, and use the array length as
boundary for the copy rather than the name table len.
TODO / FIXME !
I currently increased the initial irq name table size to 512 to deal correctly
with ARM. This is a dumb temporary fix.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
name_tables->irq_names[i] = g_quark_from_string(ltt_enum_string_get(t, i));
}
*/
+ /* FIXME: LttvIRQState *irq_states should become a g_array */
+ /* temp fix: increase from 256 to 512 default size */
- name_tables->nb_irqs = 256;
- name_tables->irq_names = g_new(GQuark, 256);
- for(i = 0 ; i < 256 ; i++) {
+ name_tables->nb_irqs = 512;
+ name_tables->irq_names = g_new(GQuark, 512);
+ for(i = 0 ; i < 512 ; i++) {
g_string_printf(fe_name, "irq %d", i);
name_tables->irq_names[i] = g_quark_from_string(fe_name->str);
}
LttvProcessState **running_process;
gboolean has_precomputed_states;
LttvCPUState *cpu_states; /* state of each cpu */
+ /* FIXME should be a g_array to deal with resize and copy. */
LttvIRQState *irq_states; /* state of each irq handler */
+ /* FIXME should be a g_array to deal with resize and copy. */
LttvSoftIRQState *soft_irq_states; /* state of each softirq */
+ /* FIXME should be a g_array to deal with resize and copy. */
LttvTrapState *trap_states; /* state of each trap */
GHashTable *bdev_states; /* state of the block devices */
};