OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:52 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [RESOLVED] [BOCHS] GDB stops on all page fault
PostPosted: Thu Jun 27, 2019 9:58 am 
Offline
Member
Member

Joined: Wed Aug 10, 2016 3:07 am
Posts: 31
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


Last edited by Haoud on Fri Jun 28, 2019 2:24 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: [BOCHS] GDB stops on all page fault
PostPosted: Thu Jun 27, 2019 10:25 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
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.


Top
 Profile  
 
 Post subject: Re: [BOCHS] GDB stops on all page fault
PostPosted: Thu Jun 27, 2019 10:41 am 
Offline
Member
Member

Joined: Wed Aug 10, 2016 3:07 am
Posts: 31
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot] and 62 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group