OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: FAT can't read big files.
PostPosted: Thu Jun 14, 2018 8:51 am 
Offline
Member
Member

Joined: Thu Apr 19, 2018 5:31 am
Posts: 27
iansjack wrote:
You can use gdb in conjunction with qemu for kernel debugging. This requires nothing extra of your code, just that you start qemu with the appropriate options. gdb allows you to work with assembler or C/C++. So you can step through C code, display (and alter) C variables - including structures, set breakpoints in C code and set watches (which break into the program when a variable changes) on C variables. It is an order of magnitude easier to work with C code this way than with an assembly-only debugger.

https://wiki.osdev.org/Kernel_Debugging ... _with_QEMU

I have managed to setup the qemu debugger with kgdb and I really like it, I had no idea that it was possible to view the direct source code because this makes things a whole lot easier.
zaval wrote:
but have you rechecked your Console code? it might be working perfectly if the length of the "MEGA, " string is small, but producing errors when it gets large. Try with the much longer string.

I have tried now with a large string containing only 'A' but this is also displayed correctly, I have also tried loading a bmp image via fat but that image is corrupted as well when I draw it to the screen. So the issue probably really exists in the reading code, but it could have been a logical explanation for the problem so thanks anyway.

_________________
Currently working on https://github.com/Remco123/CactusOS


Top
 Profile  
 
 Post subject: Re: FAT can't read big files.
PostPosted: Thu Jun 14, 2018 2:03 pm 
Offline
Member
Member
User avatar

Joined: Fri Feb 17, 2017 4:01 pm
Posts: 640
Location: Ukraine, Bachmut
by the way, where this
Code:
class Port16Bit : public Port{
...
virtual myos::common::uint16_t Read();
...
}

thing is really filled with some sense? implemented I mean.
I couldn't find it anywhere. But I have big problems with c++.

_________________
ANT - NT-like OS for x64 and arm64.
efify - UEFI for a couple of boards (mips and arm). suspended due to lost of all the target park boards (russians destroyed our town).


Top
 Profile  
 
 Post subject: Re: FAT can't read big files.
PostPosted: Fri Jun 15, 2018 3:19 am 
Offline
Member
Member

Joined: Thu Apr 19, 2018 5:31 am
Posts: 27
It is indeed a bit weird that the function is virtual but for some reason they all do work because I also use them for reading pci and some drivers and those never gave me any problems. But I will have to change the layout of that file because it is a bit messy.

_________________
Currently working on https://github.com/Remco123/CactusOS


Top
 Profile  
 
 Post subject: Re: FAT can't read big files.
PostPosted: Fri Jun 15, 2018 3:24 am 
Offline
Member
Member

Joined: Fri Aug 19, 2016 10:28 pm
Posts: 360
GhelloWorld wrote:
It is indeed a bit weird that the function is virtual but for some reason they all do work because I also use them for reading pci and some drivers and those never gave me any problems. But I will have to change the layout of that file because it is a bit messy.
I haven't looked at the sources, but from the snippet I can tell that the function is virtual, meaning that it can be overridden in subtypes, but it is not pure virtual, meaning that the class can be instantiated on its own and a default implementation is provided somewhere that will kick in.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 57 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