X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fos_debug.c;h=f821415696780efb494578813dc93f9d10ef3d14;hb=5e5c8ee949fa45116d58b904fc11aab082f61607;hp=97cdabc30cd5ec8e293e0d5f1f94e34f5f94efcb;hpb=6d6988cc9c8bac21d96afd800076afe0915cf2cd;p=palacios.git diff --git a/palacios/src/devices/os_debug.c b/palacios/src/devices/os_debug.c index 97cdabc..f821415 100644 --- a/palacios/src/devices/os_debug.c +++ b/palacios/src/devices/os_debug.c @@ -89,11 +89,36 @@ static int debug_free(struct debug_state * state) { return 0; }; +#ifdef V3_CONFIG_CHECKPOINT +static int debug_save(struct v3_chkpt_ctx * ctx, void * private_data) { + struct debug_state * dbg = (struct debug_state *)private_data; + + V3_CHKPT_STD_SAVE(ctx, dbg->debug_buf); + V3_CHKPT_STD_SAVE(ctx, dbg->debug_offset); + + return 0; +} + + +static int debug_load(struct v3_chkpt_ctx * ctx, void * private_data) { + struct debug_state * dbg = (struct debug_state *)private_data; + + V3_CHKPT_STD_LOAD(ctx, dbg->debug_buf); + V3_CHKPT_STD_LOAD(ctx, dbg->debug_offset); + + return 0; +} + +#endif static struct v3_device_ops dev_ops = { .free = (int (*)(void *))debug_free, +#ifdef V3_CONFIG_CHECKPOINT + .save = debug_save, + .load = debug_load +#endif };