mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Meta+Documentation: Allow cross-debugging x86_64 Serenity on M1 Macs
While there is no native GDB on Apple Silicon, a cross-debugger that supports x86-64 does exist.
This commit is contained in:
parent
59ba94a2d2
commit
b668000e44
Notes:
sideshowbarker
2024-07-17 01:11:48 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/b668000e44 Pull-request: https://github.com/SerenityOS/serenity/pull/17811
2 changed files with 11 additions and 1 deletions
|
@ -22,6 +22,9 @@ Toolchain/BuildFuseExt2.sh
|
|||
|
||||
# (option 2) genext2fs
|
||||
brew install genext2fs
|
||||
|
||||
# for kernel debugging, on Apple Silicon
|
||||
brew install x86_64-elf-gdb
|
||||
```
|
||||
|
||||
If you have Xcode version 13 or older, also install a newer host compiler from homebrew. Xcode 14 is known to work.
|
||||
|
@ -51,3 +54,6 @@ It's important to make sure that Xcode is not only installed but also accordingl
|
|||
Homebrew is known to ship bleeding edge CMake versions, but building CMake from source with homebrew
|
||||
gcc or llvm may not work. If homebrew does not offer cmake 3.25.x+ on your platform, it may be necessary
|
||||
to manually run Toolchain/BuildCMake.sh with Apple clang from Xcode as the first compiler in your $PATH.
|
||||
|
||||
If you want to debug the x86-64 kernel on an Apple Silicon machine, you can install the `x86_64-elf-gdb`
|
||||
package to get a native build of GDB that can cross-debug x86-64 code.
|
||||
|
|
|
@ -14,7 +14,11 @@ if [ -z "$SERENITY_KERNEL_DEBUGGER" ]; then
|
|||
PATH="$SCRIPT_DIR/../Toolchain/Local/aarch64/bin:$PATH"
|
||||
SERENITY_KERNEL_DEBUGGER="aarch64-pc-serenity-gdb"
|
||||
else
|
||||
SERENITY_KERNEL_DEBUGGER="gdb"
|
||||
if command -v x86_64-elf-gdb >/dev/null 2>&1; then
|
||||
SERENITY_KERNEL_DEBUGGER="x86_64-elf-gdb"
|
||||
else
|
||||
SERENITY_KERNEL_DEBUGGER=gdb
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue