diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-09 18:35:17 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-09 18:35:32 +0100 |
commit | de38e63d3ef5f02e104f713cfd8caa0c7df3c933 (patch) | |
tree | 9fd9011b55185789c0c923098d37807191922d04 | |
parent | 985074c790eed1e74dcf5c9bc58d9624c313e6db (diff) | |
download | serenity-de38e63d3ef5f02e104f713cfd8caa0c7df3c933.zip |
Run QEMU with the possibility to attach gdb.
-rw-r--r-- | Kernel/Process.cpp | 4 | ||||
-rwxr-xr-x | Kernel/run | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index e63e50fea4..54e0bde6e7 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -28,7 +28,7 @@ // FIXME: Some places pass strlen(arg1) as arg2. This doesn't seem entirely perfect.. #define VALIDATE_USER_READ_WITH_RETURN_TYPE(b, s, ret_type) \ do { \ - LinearAddress laddr((dword)(b)); \ + LinearAddress laddr(reinterpret_cast<dword>(b)); \ if (!validate_user_read(laddr) || !validate_user_read(laddr.offset((s) - 1))) { \ dbgprintf("Bad read address passed to syscall: %p +%u\n", laddr.get(), (s)); \ return (ret_type)-EFAULT; \ @@ -39,7 +39,7 @@ #define VALIDATE_USER_WRITE(b, s) \ do { \ - LinearAddress laddr((dword)(b)); \ + LinearAddress laddr(reinterpret_cast<dword>(b)); \ if (!validate_user_write(laddr) || !validate_user_write(laddr.offset((s) - 1))) { \ dbgprintf("Bad write address passed to syscall: %p +%u\n", laddr.get(), (s)); \ return -EFAULT; \ diff --git a/Kernel/run b/Kernel/run index a856bcf5f6..5fe20b9986 100755 --- a/Kernel/run +++ b/Kernel/run @@ -3,6 +3,6 @@ if [ "$1" = "b" ]; then bochs -q -f .bochsrc else - qemu-system-i386 -m 32 -drive format=raw,file=.floppy-image,if=floppy -drive format=raw,file=_fs_contents #$@ + qemu-system-i386 -s -m 32 -drive format=raw,file=.floppy-image,if=floppy -drive format=raw,file=_fs_contents #$@ fi |