mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
449d34a154
This adds a TUI window that displays disassembly/source code which I've found quite useful.
26 lines
790 B
Bash
Executable file
26 lines
790 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Set this environment variable to override the default debugger.
|
|
#
|
|
[ -z "$SERENITY_KERNEL_DEBUGGER" ] && SERENITY_KERNEL_DEBUGGER="gdb"
|
|
|
|
# The QEMU -s option (enabled by default in ./run) sets up a debugger
|
|
# remote on localhost:1234. So point our debugger there, and inform
|
|
# the debugger which binary to load symbols, etc from.
|
|
#
|
|
if [ "$SERENITY_ARCH" = "x86_64" ]; then
|
|
gdb_arch=i386:x86-64
|
|
kernel_binary=Kernel64
|
|
else
|
|
gdb_arch=i386:intel
|
|
kernel_binary=Kernel
|
|
fi
|
|
|
|
exec $SERENITY_KERNEL_DEBUGGER \
|
|
-ex "file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/$kernel_binary" \
|
|
-ex "set arch $gdb_arch" \
|
|
-ex 'target remote localhost:1234' \
|
|
-ex "source $(dirname "$0")/serenity_gdb.py" \
|
|
-ex "layout asm" \
|
|
-ex "fs next" \
|
|
"$@"
|