1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 04:17:34 +00:00

HackStudio: Enable building HackStudio on x86_64

This implements bits and pieces to get the debugging functionality to
build. No testing has been done to check whether it actually works
because GCC doesn't currently work.
This commit is contained in:
Gunnar Beutner 2021-08-02 00:07:23 +02:00 committed by Andreas Kling
parent fb099ad38b
commit b81926d933
14 changed files with 110 additions and 29 deletions

View file

@ -46,4 +46,42 @@ struct [[gnu::packed]] PtraceRegisters {
u32 es;
u32 fs;
u32 gs;
#ifdef __cplusplus
FlatPtr ip() const
{
# if ARCH(I386)
return eip;
# else
return rip;
# endif
}
void set_ip(FlatPtr ip)
{
# if ARCH(I386)
eip = ip;
# else
rip = ip;
# endif
}
FlatPtr bp() const
{
# if ARCH(I386)
return ebp;
# else
return rbp;
# endif
}
void set_bp(FlatPtr bp)
{
# if ARCH(I386)
ebp = bp;
# else
rbp = bp;
# endif
}
#endif
};