feature (logger): implemented debug log macro which logs file and line number of its call in adition to a given format string

This commit is contained in:
antifallobst 2023-04-26 20:14:06 +02:00
parent 6dc7e0a11e
commit c1ec695ff6
2 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,8 @@
#define LOG_PORT 0x3F8 #define LOG_PORT 0x3F8
#define DEBUG(f, args...) log(LOG_DEBUG, "%s:%d -> " f, __FILE_NAME__, __LINE__, ##args)
typedef enum { typedef enum {
LOG_NONE, LOG_NONE,
LOG_INFO, LOG_INFO,

View File

@ -60,6 +60,8 @@ void kmain(boot_info_T boot_info) {
log(LOG_INFO, "!=====[ Kernel Initialized ]=====!\n"); log(LOG_INFO, "!=====[ Kernel Initialized ]=====!\n");
DEBUG("test %d", 1312);
pci_device_T* ahci_controller = pci_manager_find_device(PCI_CLASS_MASS_STORAGE_CONTROLLER, PCI_SUBCLASS_SERIAL_ATA_CONTROLLER, 1); pci_device_T* ahci_controller = pci_manager_find_device(PCI_CLASS_MASS_STORAGE_CONTROLLER, PCI_SUBCLASS_SERIAL_ATA_CONTROLLER, 1);
CORE_HALT_FOREVER CORE_HALT_FOREVER