Really Wierd Bochs Problem
Really Wierd Bochs Problem
I?ve got a problem when I am using bochs. I tried installing Win98 on it (using the traditional install method) but it never got past the second part of installation (after the first reboot). The setup configures the system for a while, and then bochs exits with an error message. Please help me; I?ve attached a copy of bochsout.txt.
(I also seem to be having problems running my own OS on bochs...)
(I also seem to be having problems running my own OS on bochs...)
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Really Wierd Bochs Problem
i'm not sure you are at the best place for solving your problem (BOCHS Faq & support might be more accurate).
But we'll try to do our best nonetheless ... if only you posted your promised .txt file :-p
But we'll try to do our best nonetheless ... if only you posted your promised .txt file :-p
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Really Wierd Bochs Problem
it seems that you have a function that tries to return to an invalid address. This is the classical result of a "stack nappalm": a wrong command has overwriten some stack location without you noticed it, and among others, it has overwritten the return address of a function (not necessarily the function that is currently running, but this is more likely to be the case
Look through your code for uninitialized pointers (things like
) or for some function-local arrays whose boundaries are broken ...
Look through your code for uninitialized pointers (things like
Code: Select all
void f() {
char* ptr;
*ptr='a';
}
Re:Really Wierd Bochs Problem
..
Last edited by Perica on Sun Dec 03, 2006 8:58 pm, edited 1 time in total.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Really Wierd Bochs Problem
@perica:
Your 0x08 descriptor must be wrong (check its TYPE field)... If it isn't wrong, then it's likely that your GDT is badly located by the CPU (i.E. check the GDTR registers hold the physical address of your GDT.)
btw, was this the best thread to post ?
it seems that you tend to post your own problems in s.o. else's thread rather than starting a new thread which usually leads to confusion (we don't know who's answering who). So please ...
Your 0x08 descriptor must be wrong (check its TYPE field)... If it isn't wrong, then it's likely that your GDT is badly located by the CPU (i.E. check the GDTR registers hold the physical address of your GDT.)
btw, was this the best thread to post ?
it seems that you tend to post your own problems in s.o. else's thread rather than starting a new thread which usually leads to confusion (we don't know who's answering who). So please ...
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Really Wierd Bochs Problem
@Mastermind:
You can do the following: start box(-chs) debugger, configure a bochs-error-logfile and enable tracing via trace-on at box-cli. THen you will see, at which instruction your program craps out.
I 've experienced such weird errors when I coded the interpreter for my printf-function - the one to scan the passed string for %d, %s ,... - because at the very end, I forgot to add one small but important *text--. It lead to stack overflow and more due to an inconsistent program flow.
I recommend that you scan your code for such inconsistencies: forgotten increments/decrements, if(i=0) instead of if(!i) or if(i==0). Mark: in c it is possible to have the conditions calculated. p. ex.:if(i--) exit;
Hope this helps. With out the actual code it is a little hard to solve the problem. You might give a link to the code in question, hm?
@perica: Gosh, there exist some threads about this problem. Have the search engine look for them, thats what it is for, hmm?
stay safe
You can do the following: start box(-chs) debugger, configure a bochs-error-logfile and enable tracing via trace-on at box-cli. THen you will see, at which instruction your program craps out.
I 've experienced such weird errors when I coded the interpreter for my printf-function - the one to scan the passed string for %d, %s ,... - because at the very end, I forgot to add one small but important *text--. It lead to stack overflow and more due to an inconsistent program flow.
I recommend that you scan your code for such inconsistencies: forgotten increments/decrements, if(i=0) instead of if(!i) or if(i==0). Mark: in c it is possible to have the conditions calculated. p. ex.:if(i--) exit;
Hope this helps. With out the actual code it is a little hard to solve the problem. You might give a link to the code in question, hm?
@perica: Gosh, there exist some threads about this problem. Have the search engine look for them, thats what it is for, hmm?
stay safe
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Really Wierd Bochs Problem
..
Last edited by Perica on Sun Dec 03, 2006 8:58 pm, edited 1 time in total.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Really Wierd Bochs Problem
Perica, I am sorry: but when you say: A small typo in my code caused the fault, why do you think box is to be blamed for that?
I do not understand the way from your premise to your conclusio. Well, I am just a nerd. Shame on me for not to unerstand simple things.
I do not understand the way from your premise to your conclusio. Well, I am just a nerd. Shame on me for not to unerstand simple things.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Really Wierd Bochs Problem
i like using an older PC (500mhz) with a floppy drive to test my code to make sure an error isnt the result of bochs.
Re:Really Wierd Bochs Problem
That's what i've been doing until i came across bochs.slacker wrote: i like using an older PC (500mhz) with a floppy drive to test my code to make sure an error isnt the result of bochs.
Oh yeah... I fixed up my os... ( Win98 still dies... >:( )
Re:Really Wierd Bochs Problem
..
Last edited by Perica on Sun Dec 03, 2006 8:58 pm, edited 1 time in total.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Really Wierd Bochs Problem
ok, perica No problem.
ad box: I like using it to trace down obscure errors. it eases debugging in a very convenient manner. The only thing: I have to disable several hardware relative functions (f. ex. keyboard led switching) because those ports aren't supported by bochs. Well, i don't mind. I test it usually on a bare pc with floppy: my athlon xp workstation. Development I do on my notebook, so no need to bother about rebooting.
ad box: I like using it to trace down obscure errors. it eases debugging in a very convenient manner. The only thing: I have to disable several hardware relative functions (f. ex. keyboard led switching) because those ports aren't supported by bochs. Well, i don't mind. I test it usually on a bare pc with floppy: my athlon xp workstation. Development I do on my notebook, so no need to bother about rebooting.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image