OSDev.org
https://forum.osdev.org/

[RESOLVED] [BOCHS] GDB stops on all page fault
https://forum.osdev.org/viewtopic.php?f=1&t=33744
Page 1 of 1

Author:  Haoud [ Thu Jun 27, 2019 9:58 am ]
Post subject:  [RESOLVED] [BOCHS] GDB stops on all page fault

Hello, my problem is very simple but I can't solve it. When I debug my kernel with gdb and bochs (compiled on my pc), gdb stops on all page faults, which is very annoying because my kernel uses demand paging. How to disable this feature?
If you want more information, do not hesitate to ask me

Author:  iansjack [ Thu Jun 27, 2019 10:25 am ]
Post subject:  Re: [BOCHS] GDB stops on all page fault

Are you sure it's not triple faulting? Unless you set a breakpoint, gdb won't halt on an exception. But I believe that Bochs can be configured to halt on a triple fault.

Author:  Haoud [ Thu Jun 27, 2019 10:41 am ]
Post subject:  Re: [BOCHS] GDB stops on all page fault

No, I'm sure my kernel doesn't triple fault because the execution continues normally. Maybe it's a bochs problem?
In the terminal, i can read "stopped with ac0"

EDIT: Okay, I found a solution to my problem. I modified the bochs source code. In cpu.cc, i removed this lines:
Code:
#if BX_GDBSTUB
    if (bx_dbg.gdbstub_enabled) return;
#endif

And now all of them work as I wish, even if I don't know all the consequences of this change.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/