Move debugging functions to io folder.

This commit is contained in:
Enrico Fraccaroli
2021-11-10 12:14:40 +01:00
parent f8da589298
commit ca4250c663
41 changed files with 42 additions and 42 deletions
+2 -2
View File
@@ -167,6 +167,7 @@ if(USE_BUDDY_SYSTEM)
src/io/mm_io.c
src/io/video.c
src/io/stdio.c
src/io/debug.c
src/io/proc_video.c
src/io/proc_running.c
src/io/proc_system.c
@@ -197,7 +198,6 @@ if(USE_BUDDY_SYSTEM)
src/mem/vmem_map.c
src/mem/zone_allocator.c
src/mem/buddysystem.c
src/misc/debug.c
src/elf/elf.c
src/descriptor_tables/gdt.c
src/descriptor_tables/gdt.S
@@ -250,6 +250,7 @@ else(USE_BUDDY_SYSTEM)
src/io/mm_io.c
src/io/video.c
src/io/stdio.c
src/io/debug.c
src/io/proc_video.c
src/io/proc_running.c
src/io/proc_system.c
@@ -279,7 +280,6 @@ else(USE_BUDDY_SYSTEM)
src/mem/slab.c
src/mem/vmem_map.c
src/mem/zone_allocator.c
src/misc/debug.c
src/elf/elf.c
src/descriptor_tables/gdt.c
src/descriptor_tables/gdt.S
+1 -1
View File
@@ -55,7 +55,7 @@ static inline void __outportb(uint16_t port, uint8_t data)
static inline void __debug_putchar(char c)
{
#if (defined(DEBUG_STDIO) || defined(DEBUG_LOG))
outportb(SERIAL_COM1, c);
__outportb(SERIAL_COM1, c);
#endif
}
+1 -1
View File
@@ -8,7 +8,7 @@
#include "descriptor_tables/isr.h"
#include "descriptor_tables/idt.h"
#include "stdio.h"
#include "misc/debug.h"
#include "io/debug.h"
// Default error messages for exceptions.
static const char *exception_messages[32] = {
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "misc/debug.h"
#include "io/debug.h"
#include "descriptor_tables/gdt.h"
#include "descriptor_tables/tss.h"
+1 -1
View File
@@ -11,7 +11,7 @@
#include "system/printk.h"
#include "assert.h"
#include "stdio.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "descriptor_tables/idt.h"
/// @brief Shared interrupt handlers, stored into a double-linked list.
+1 -1
View File
@@ -7,7 +7,7 @@
#include "descriptor_tables/tss.h"
#include "string.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "descriptor_tables/gdt.h"
static tss_entry_t kernel_tss;
+1 -1
View File
@@ -6,7 +6,7 @@
#include "devices/fpu.h"
#include "descriptor_tables/isr.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "string.h"
#include "assert.h"
#include "process/scheduler.h"
+1 -1
View File
@@ -6,7 +6,7 @@
///! @cond Doxygen_Suppress
#include "devices/pci.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "string.h"
#include "io/port_io.h"
+1 -1
View File
@@ -16,7 +16,7 @@
#include "descriptor_tables/isr.h"
#include "fs/vfs.h"
#include "devices/pci.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "mem/kheap.h"
#include "assert.h"
#include "string.h"
+1 -1
View File
@@ -13,7 +13,7 @@
#include "drivers/keyboard/keymap.h"
#include "sys/bitops.h"
#include "io/video.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "ctype.h"
#include "descriptor_tables/isr.h"
#include "process/scheduler.h"
+1 -1
View File
@@ -14,7 +14,7 @@
#include "process/process.h"
#include "string.h"
#include "stddef.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "stdio.h"
#include "mem/slab.h"
#include "fs/vfs.h"
+1 -1
View File
@@ -10,7 +10,7 @@
#include "system/panic.h"
#include "fs/vfs.h"
#include "sys/errno.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "mem/kheap.h"
#include "fcntl.h"
#include "sys/bitops.h"
+1 -1
View File
@@ -11,7 +11,7 @@
#include "system/syscall.h"
#include "string.h"
#include "limits.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "sys/errno.h"
#include "stdio.h"
#include "fs/vfs.h"
+1 -1
View File
@@ -11,7 +11,7 @@
#include "fs/vfs.h"
#include "string.h"
#include "sys/errno.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "fcntl.h"
#include "libgen.h"
#include "assert.h"
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "misc/debug.h"
#include "io/debug.h"
#include "sys/errno.h"
#include "fs/vfs.h"
#include "mem/kheap.h"
+1 -1
View File
@@ -15,7 +15,7 @@
#include "fs/procfs.h"
#include "assert.h"
#include "libgen.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "system/panic.h"
#include "stdio.h"
+1 -1
View File
@@ -12,7 +12,7 @@
#include "io/port_io.h"
#include "stdint.h"
#include "mem/kheap.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "process/wait.h"
#include "drivers/rtc.h"
#include "descriptor_tables/isr.h"
+1 -1
View File
@@ -5,7 +5,7 @@
/// See LICENSE.md for details.
#include "sys/bitops.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "klib/spinlock.h"
#include "io/port_io.h"
#include "kernel.h"
+1 -1
View File
@@ -9,7 +9,7 @@
#include "libgen.h"
#include "stdio.h"
#include "sys/errno.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "process/prio.h"
/// @brief Returns the character identifying the process state.
+1 -1
View File
@@ -10,7 +10,7 @@
#include "string.h"
#include "stdio.h"
#include "sys/errno.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "hardware/timer.h"
static ssize_t procs_do_uptime(char *buffer, size_t bufsize);
+1 -1
View File
@@ -8,7 +8,7 @@
#include "bits/ioctls.h"
#include "sys/bitops.h"
#include "io/video.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "sys/errno.h"
#include "fcntl.h"
#include "fs/vfs.h"
+1 -1
View File
@@ -7,7 +7,7 @@
#include "io/port_io.h"
#include "stdbool.h"
#include "string.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "math.h"
#define COUNT_OF(x) ((sizeof(x) / sizeof(0 [x])) / ((size_t)(!(sizeof(x) % sizeof(0 [x])))))
+1 -1
View File
@@ -17,7 +17,7 @@
#include "version.h"
#include "io/video.h"
#include "hardware/pic8259.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "drivers/fdc.h"
#include "fs/initrd.h"
#include "klib/irqflags.h"
+1 -1
View File
@@ -5,7 +5,7 @@
/// See LICENSE.md for details.
#include "klib/mutex.h"
#include "misc/debug.h"
#include "io/debug.h"
void mutex_lock(mutex_t *mutex, uint32_t owner)
{
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "misc/debug.h"
#include "io/debug.h"
#include "klib/ndtree.h"
#include "assert.h"
#include "klib/list_head.h"
+1 -1
View File
@@ -7,7 +7,7 @@
#include "klib/rbtree.h"
#include "assert.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "mem/slab.h"
/// @brief Stores information of a node.
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "misc/debug.h"
#include "io/debug.h"
#include "time.h"
#include "stdio.h"
#include "stddef.h"
+1 -1
View File
@@ -7,7 +7,7 @@
#include "fs/vfs.h"
#include "ctype.h"
#include "string.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "stdio.h"
static int vsscanf(const char *buf, const char *s, va_list ap)
+1 -1
View File
@@ -11,7 +11,7 @@
#include "mem/buddysystem.h"
#include "mem/paging.h"
#include "assert.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "system/panic.h"
/// @brief Cache level low limit after which allocation starts.
+1 -1
View File
@@ -9,7 +9,7 @@
#include "mem/kheap.h"
#include "math.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "string.h"
#include "mem/paging.h"
#include "assert.h"
+1 -1
View File
@@ -12,7 +12,7 @@
#include "mem/vmem_map.h"
#include "mem/zone_allocator.h"
#include "mem/kheap.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "assert.h"
#include "string.h"
#include "system/panic.h"
+1 -1
View File
@@ -10,7 +10,7 @@
#include "mem/zone_allocator.h"
#include "mem/paging.h"
#include "assert.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "mem/slab.h"
/// @brief Use it to manage cached pages.
+1 -1
View File
@@ -14,7 +14,7 @@
#include "assert.h"
#include "mem/paging.h"
#include "string.h"
#include "misc/debug.h"
#include "io/debug.h"
/// TODO: Comment.
#define MIN_PAGE_ALIGN(addr) ((addr) & (~(PAGE_SIZE - 1)))
+1 -1
View File
@@ -11,7 +11,7 @@
#include "kernel.h"
#include "sys/bitops.h"
#include "stddef.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "system/panic.h"
#include "stddef.h"
+1 -1
View File
@@ -20,7 +20,7 @@
#include "sys/errno.h"
#include "fcntl.h"
#include "system/panic.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "process/wait.h"
#include "process/prio.h"
#include "fs/vfs.h"
+1 -1
View File
@@ -17,7 +17,7 @@
#include "process/wait.h"
#include "mem/kheap.h"
#include "system/panic.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "time.h"
#include "sys/errno.h"
#include "klib/list_head.h"
+1 -1
View File
@@ -6,7 +6,7 @@
#include "hardware/timer.h"
#include "process/prio.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "assert.h"
#include "klib/list_head.h"
#include "process/wait.h"
+1 -1
View File
@@ -8,7 +8,7 @@
#include "sys/module.h"
#include "string.h"
#include "sys/bitops.h"
#include "misc/debug.h"
#include "io/debug.h"
/// Defined in kernel.ld, points at the end of kernel's data segment.
extern void *_kernel_end;
+1 -1
View File
@@ -7,7 +7,7 @@
#include "string.h"
#include "sys/utsname.h"
#include "version.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "sys/errno.h"
#include "fcntl.h"
#include "fs/vfs.h"
+1 -1
View File
@@ -5,7 +5,7 @@
/// See LICENSE.md for details.
#include "system/panic.h"
#include "misc/debug.h"
#include "io/debug.h"
void kernel_panic(const char *msg)
{
+1 -1
View File
@@ -13,7 +13,7 @@
#include "process/process.h"
#include "sys/errno.h"
#include "assert.h"
#include "misc/debug.h"
#include "io/debug.h"
#include "string.h"
#include "klib/irqflags.h"