mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +00:00
LibJIT: Enable registering JITted objects into GDB
The new JIT::GDB namespace enables registering JITted objects into GDB dynamically. Its clients just have to ensure the memory they give to `register_into_gdb` is in a format that GDB can understand, either by generating an object file in memory with debug info + symbols or by registering a custom debug info parser. None of these are implemented by this API; it only implements the registering part and lets the client to choose the data format. GDB JIT Interface: https://sourceware.org/gdb/current/onlinedocs/gdb.html/JIT-Interface.html#JIT-Interface Things to take into account from v8's docs, some of which we may improve: https://v8.dev/docs/gdb-jit#known-limitations
This commit is contained in:
parent
7e974f530d
commit
bc70144df1
3 changed files with 120 additions and 0 deletions
15
Userland/Libraries/LibJIT/GDB.h
Normal file
15
Userland/Libraries/LibJIT/GDB.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Jesús Lapastora <cyber.gsuscode@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Span.h>
|
||||
|
||||
namespace JIT::GDB {
|
||||
|
||||
void register_into_gdb(ReadonlyBytes data);
|
||||
void unregister_from_gdb(ReadonlyBytes data);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue