can i gdb SerenityOS
Hi, Can I gdb SerenityOS? Thanks.
https://lab.bjg.io/serenityos/gdb-port.html
gdb: https://github.com/SerenityOS/serenity/pull/12676
sdb: https://github.com/SerenityOS/serenity/pull/1885
Hi there!
It depends on what you mean.
If you want to run gdb on the entire OS, you can use Meta/serenity.sh gdb and that will let you debug the kernel.
If you want to debug an app inside SerenityOS, we have the sdb command which is similar to gdb. We also have a gdb port which you can install to run gdb. (Go to that directory and run the package.sh script to install it.)
The serenity.sh script also provides a number of other commands. Run the script without arguments for a list.
$ ./Meta/serenity.sh
Usage: serenity.sh COMMAND [TARGET] [TOOLCHAIN] [ARGS...]
Supported TARGETs: aarch64, x86_64, riscv64, lagom. Defaults to SERENITY_ARCH, or x86_64 if not set.
Supported TOOLCHAINs: GNU, Clang. Defaults to SERENITY_TOOLCHAIN, or GNU if not set.
Supported COMMANDs:
gdb: Same as run, but also starts a gdb remote session.
TARGET lagom: serenity.sh gdb lagom LAGOM_EXECUTABLE [-ex 'any gdb command']...
Passes through '-ex' commands to gdb
All other TARGETs: serenity.sh gdb [TARGET] [KERNEL_CMD_LINE] [-ex 'any gdb command']...
If specified, passes the KERNEL_CMD_LINE to the Kernel
Passes through '-ex' commands to gdb
Documentation: https://github.com/SerenityOS/serenity/blob/master/Documentation/BuildInstructions.md#build
Further help: SerenityOS Discord
Hi there!
It depends on what you mean.
If you want to run gdb on the entire OS, you can use
Meta/serenity.sh gdband that will let you debug the kernel.If you want to debug an app inside SerenityOS, we have the
sdbcommand which is similar togdb. We also have a gdb port which you can install to run gdb. (Go to that directory and run thepackage.shscript to install it.)
Thanks. The first one is what i want. I will look into that.
The serenity.sh script also provides a number of other commands. Run the script without arguments for a list.
$ ./Meta/serenity.sh Usage: serenity.sh COMMAND [TARGET] [TOOLCHAIN] [ARGS...] Supported TARGETs: aarch64, x86_64, riscv64, lagom. Defaults to SERENITY_ARCH, or x86_64 if not set. Supported TOOLCHAINs: GNU, Clang. Defaults to SERENITY_TOOLCHAIN, or GNU if not set. Supported COMMANDs: gdb: Same as run, but also starts a gdb remote session. TARGET lagom: serenity.sh gdb lagom LAGOM_EXECUTABLE [-ex 'any gdb command']... Passes through '-ex' commands to gdb All other TARGETs: serenity.sh gdb [TARGET] [KERNEL_CMD_LINE] [-ex 'any gdb command']... If specified, passes the KERNEL_CMD_LINE to the Kernel Passes through '-ex' commands to gdbDocumentation: https://github.com/SerenityOS/serenity/blob/master/Documentation/BuildInstructions.md#build
Further help: SerenityOS Discord
It helps. Thanks.