OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 18, 2024 5:11 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to run debug version of bochs non-interactively
PostPosted: Thu Jun 01, 2017 11:30 am 
Offline

Joined: Tue Apr 04, 2017 2:37 pm
Posts: 19
I would like to write some completely automated system tests for my OS (i.e., I run a test script and get a "success" or "fail" message). The problem is that I have the debug features compiled into bochs; thus, when I run "bochs -q" it stops at the debug command line and waits for the user to press "c". Is there a way to tell bochs not to pause at the command line (other than replacing the debug version with the non-debug version)?


Top
 Profile  
 
 Post subject: Re: How to run debug version of bochs non-interactively
PostPosted: Thu Jun 01, 2017 11:41 am 
Offline
Member
Member
User avatar

Joined: Thu Aug 11, 2005 11:00 pm
Posts: 1110
Location: Tartu, Estonia
You can run your bochs version as "bochs -rc somefile.txt", where somefile.txt contains commands to be executed by the debugger, one on each line. I often use something like this to set a breakpoint, run until that point, dump registers and exit:
Code:
lb 0x1234
c
info registers
q

_________________
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS


Top
 Profile  
 
 Post subject: Re: How to run debug version of bochs non-interactively
PostPosted: Thu Jun 01, 2017 12:01 pm 
Offline

Joined: Tue Apr 04, 2017 2:37 pm
Posts: 19
That's exactly what I was looking for. Thanks.


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], Google [Bot], Majestic-12 [Bot] and 209 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group