Page 1 of 1
[RESOLVED] [BOCHS] GDB stops on all page fault
Posted: Thu Jun 27, 2019 9:58 am
by Haoud
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
Re: [BOCHS] GDB stops on all page fault
Posted: Thu Jun 27, 2019 10:25 am
by iansjack
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.
Re: [BOCHS] GDB stops on all page fault
Posted: Thu Jun 27, 2019 10:41 am
by Haoud
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: Select all
#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.