diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-07-26 15:10:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-27 13:15:16 +0200 |
commit | 57417a3d6efe872d26cc790c5cc009dac3a3c8be (patch) | |
tree | 8ec61e9fcd76db03945c5b413276a920fc422087 /Meta/debug-kernel.sh | |
parent | e3d2ca6bd20257bbb49a8da5e37b8e71dc697333 (diff) | |
download | serenity-57417a3d6efe872d26cc790c5cc009dac3a3c8be.zip |
Kernel: Support loading the kernel at almost arbitrary virtual addresses
This enables further work on implementing KASLR by adding relocation
support to the pre-kernel and updating the kernel to be less dependent
on specific virtual memory layouts.
Diffstat (limited to 'Meta/debug-kernel.sh')
-rwxr-xr-x | Meta/debug-kernel.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Meta/debug-kernel.sh b/Meta/debug-kernel.sh index c33c3da4a0..f7dd66b0a8 100755 --- a/Meta/debug-kernel.sh +++ b/Meta/debug-kernel.sh @@ -10,12 +10,19 @@ # if [ "$SERENITY_ARCH" = "x86_64" ]; then gdb_arch=i386:x86-64 + prekernel_image=Prekernel64 + kernel_base=0x2000200000 else gdb_arch=i386:intel + prekernel_image=Prekernel + kernel_base=0xc0200000 fi exec $SERENITY_KERNEL_DEBUGGER \ - -ex "file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/Kernel" \ + -ex "file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/Prekernel/$prekernel_image" \ + -ex "set confirm off" \ + -ex "add-symbol-file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/Kernel -o $kernel_base" \ + -ex "set confirm on" \ -ex "set arch $gdb_arch" \ -ex 'target remote localhost:1234' \ -ex "source $(dirname "$0")/serenity_gdb.py" \ |