I have tested the issue use "-vga none -nographic" option. QEMU segment faults.
But i think there is no any text and graphic console created in this case. The console[0] is NULL. The vga_hw_screen_dump() should return before console_select(). What do you think? --- console.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/console.c b/console.c index f6fe441..957948e 100644 --- a/console.c +++ b/console.c @@ -184,6 +184,9 @@ void vga_hw_screen_dump(const char *filename) console_select(0); if (consoles[0] && consoles[0]->hw_screen_dump) { consoles[0]->hw_screen_dump(consoles[0]->hw, filename); + } else { + fprintf(stderr,"no any console,could not screen dump \n"); + return; } console_select(previous_active_console->index); -- 1.7.1