FAT can't read big files.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
GhelloWorld
Member
Member
Posts: 27
Joined: Thu Apr 19, 2018 5:31 am

Re: FAT can't read big files.

Post by GhelloWorld »

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.
User avatar
zaval
Member
Member
Posts: 659
Joined: Fri Feb 17, 2017 4:01 pm
Location: Ukraine, Bachmut
Contact:

Re: FAT can't read big files.

Post by zaval »

by the way, where this

Code: Select all

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).
GhelloWorld
Member
Member
Posts: 27
Joined: Thu Apr 19, 2018 5:31 am

Re: FAT can't read big files.

Post by GhelloWorld »

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.
simeonz
Member
Member
Posts: 360
Joined: Fri Aug 19, 2016 10:28 pm

Re: FAT can't read big files.

Post by simeonz »

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.
Post Reply