Board.KolibriOS.org

Official KolibriOS board
It is currently Mon Oct 14, 2019 2:31 pm

All times are UTC+03:00




Post new topic  Reply to topic  [ 226 posts ]  Go to page Previous 112 13 14 15 16
Author Message
 Post subject: Re: Newlib
PostPosted: Sun May 21, 2017 1:02 pm 
Offline
Mentor

Joined: Tue Mar 11, 2014 11:37 am
Posts: 184
hi,

Found this missing error reporting when a user was trying to run Netsurf and it wouldnt load.
With some debugging, and realizing that the main() function was not called, finally I figured out it's because of loading the libc.dll
With this change in contrib/toolchain/, the users who run C applications and dont have a libc.dll will see an error message in the DEBUG BOARD.

Code:
Index: gcc/5x/libgcc/config/i386/kos32-app.c
===================================================================
--- gcc/5x/libgcc/config/i386/kos32-app.c   (revision 6898)
+++ gcc/5x/libgcc/config/i386/kos32-app.c   (working copy)
@@ -21,6 +21,14 @@
 
     if(!img)
     {
+        // Inform the user via BOARD that libc could not be loaded.
+        char *errormsg = "[ERROR] libc.dll failed to load. is /kolibrios folder configured?\n";
+        while (*errormsg) {
+          __asm__ __volatile__("int $0x40"::"a"(63), "b"(1), "c"(*errormsg));
+          ++errormsg;
+        }
+
+        // Exit
         asm ("int $0x40" ::"a"(-1));
     };


I've Pushed this to SVN as well.
In case you disagree with these changes, please let me know :)

_________________
---
Check out the Netsurf Web Browser for KolibriOS.
Read the wiki and happy hacking with KolibriOS!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 226 posts ]  Go to page Previous 112 13 14 15 16

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 1 guest


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® Forum Software © phpBB Limited