Add clangd support for VS Code (#2207)

* Add clangd support for VS Code

* Revert accidental change
This commit is contained in:
Luke Street
2024-10-12 22:43:10 -06:00
committed by GitHub
parent 7ec2d80414
commit 0db466edfa
29 changed files with 436 additions and 119 deletions
@@ -23,4 +23,4 @@ typedef long ptrdiff_t;
};
#endif
#endif
#endif
@@ -19,7 +19,7 @@ extern "C" void* __va_arg(_va_list_struct*, int);
void* __va_arg(_va_list_struct*, int);
#endif
#if IN_VSCODE_EDITOR
#ifndef __MWERKS__
#define __builtin_va_info(...)
#define _var_arg_typeof(...)
#endif
@@ -37,4 +37,4 @@ void* __va_arg(_va_list_struct*, int);
#define __va_copy(a, b) (*(a) = *(b))
#endif /* __VA_ARG_H */
#endif /* __VA_ARG_H */
+2 -2
View File
@@ -3,7 +3,7 @@
#include "dolphin/card/CARDPriv.h"
#include "dolphin/os/OSRtc.h"
u8 GameChoice : 0x800030E3;
u8 GameChoice AT_ADDRESS(0x800030E3);
static BOOL IsCard(u32 id);
static s32 DoMount(s32 chan);
@@ -395,4 +395,4 @@ s32 CARDUnmount(s32 chan) {
}
DoUnmount(chan, CARD_RESULT_NOCARD);
return CARD_RESULT_READY;
}
}
+2 -2
View File
@@ -678,7 +678,7 @@ asm void __OSPSInit(void){
// clang-format on
}
vu32 __DIRegs[16] : 0xCC006000;
vu32 __DIRegs[16] AT_ADDRESS(0xCC006000);
#define DI_CONFIG_IDX 0x9
#define DI_CONFIG_CONFIG_MASK 0xFF
@@ -690,4 +690,4 @@ u32 __OSGetDIConfig(void) {
/* 8033A874-8033A8A0 3351B4 002C+00 1/1 11/11 0/0 .text OSRegisterVersion */
void OSRegisterVersion(const char* version) {
OSReport("%s\n", version);
}
}
+6 -6
View File
@@ -104,7 +104,7 @@ static void Callback(s32, DVDCommandBlock*) {
Prepared = TRUE;
}
OSExecParams* osExecParams : 0x800030f0;
OSExecParams* osExecParams AT_ADDRESS(0x800030f0);
static int IsStreamEnabled() {
if (DVDGetCurrentDiskID()->is_streaming) {
@@ -148,7 +148,7 @@ static void StopStreaming() {
}
/* 8033CCFC-8033CDC0 33763C 00C4+00 1/1 0/0 0/0 .text GetApploaderPosition */
s32 __OSAppLoaderOffset : 0x800030f4;
s32 __OSAppLoaderOffset AT_ADDRESS(0x800030f4);
static int GetApploaderPosition(void) {
static s32 apploaderPosition;
@@ -220,9 +220,9 @@ static BOOL IsNewApploader(AppLoaderStruct* header) {
return strncmp(header->date, "2004/02/01", 10) > 0 ? TRUE : FALSE;
}
extern volatile u32 BOOT_REGION_START : 0x812FDFF0;
extern volatile u32 BOOT_REGION_END : 0x812FDFEC;
extern volatile u8 g_unk_800030E2 : 0x800030E2;
extern volatile u32 BOOT_REGION_START AT_ADDRESS(0x812FDFF0);
extern volatile u32 BOOT_REGION_END AT_ADDRESS(0x812FDFEC);
extern volatile u8 g_unk_800030E2 AT_ADDRESS(0x800030E2);
/* 8033CDC0-8033D244 337700 0484+00 1/1 0/0 0/0 .text __OSBootDolSimple */
void __OSBootDolSimple(u32 doloffset, u32 restartCode, void* regionStart, void* regionEnd, BOOL argsUseDefault, s32 argc, char** argv) {
@@ -312,4 +312,4 @@ void __OSBootDol(u32 doloffset, u32 restartCode, const char** argv) {
}
__OSBootDolSimple(-1, restartCode, saveStart, saveEnd, FALSE, argvlen, argvToPass);
}
}
+3 -3
View File
@@ -3,8 +3,8 @@
#include "dolphin/exi/EXIBios.h"
#include "dolphin/os.h"
vu32 __PIRegs[12] : 0xCC003000;
vu16 __MEMRegs[64] : 0xCC004000;
vu32 __PIRegs[12] AT_ADDRESS(0xCC003000);
vu16 __MEMRegs[64] AT_ADDRESS(0xCC004000);
/* 8033D6F4-8033D700 338034 000C+00 2/2 200/200 5/5 .text OSDisableInterrupts */
asm BOOL OSDisableInterrupts(void) {
@@ -445,4 +445,4 @@ static asm void ExternalInterruptHandler(register __OSInterrupt type, register O
stwu r1, -8(r1)
b __OSDispatchInterrupt
// clang-format on
}
}
+2 -2
View File
@@ -4,7 +4,7 @@
#define TRUNC(n, a) (((u32)(n)) & ~((a)-1))
#define ROUND(n, a) (((u32)(n) + (a)-1) & ~((a)-1))
vu16 __MEMRegs[64] : 0xCC004000;
vu16 __MEMRegs[64] AT_ADDRESS(0xCC004000);
extern OSErrorHandlerEx __OSErrorTable[16];
@@ -216,4 +216,4 @@ void __OSInitMemoryProtection() {
__OSUnmaskInterrupts(OS_INTERRUPTMASK_MEM_ADDRESS);
OSRestoreInterrupts(enabled);
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
#include "dolphin/os/OSReset.h"
#include "dolphin/os.h"
vu16 __VIRegs[59] : 0xCC002000;
vu16 __VIRegs[59] AT_ADDRESS(0xCC002000);
OSThreadQueue __OSActiveThreadQueue : (OS_BASE_CACHED | 0x00DC);
extern OSExecParams __OSRebootParams;
@@ -217,4 +217,4 @@ u32 OSGetResetCode(void) {
return 0x80000000 | __OSRebootParams.restartCode;
return ((__PIRegs[9] & ~7) >> 3);
}
}