mirror of https://github.com/ClassiCube/ClassiCube
Dreamcast: Include thread name in crash dump
This commit is contained in:
parent
2e7a5c9897
commit
0efd939a2d
|
|
@ -35,7 +35,7 @@ DEPFILES := $(OBJS:%.o=%.d)
|
|||
#---------------------------------------------------------------------------------
|
||||
# Code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
CFLAGS = -O1 -DPLAT_VITA
|
||||
CFLAGS = -O1 -DPLAT_VITA -fno-math-errno
|
||||
|
||||
LDFLAGS = -Wl,-q
|
||||
LIBS = -lm -lSceDisplay_stub -lSceCtrl_stub -lSceTouch_stub -lSceGxm_stub -lSceCommonDialog_stub -lSceAppUtil_stub
|
||||
|
|
|
|||
|
|
@ -58,10 +58,8 @@ static unsigned x509_maybe_skip_verify(unsigned r) {
|
|||
if (r != BR_ERR_X509_EXPIRED) return r;
|
||||
|
||||
cc_uint64 cur = DateTime_CurrentUTC();
|
||||
uint32_t days = (uint32_t)(cur / 86400) + 366;
|
||||
|
||||
/* Time earlier than August 2024 usually mean an improperly calibrated RTC */
|
||||
if (days < 739464) return 0;
|
||||
/* Time earlier than 19 Sep 2025 usually mean an improperly calibrated RTC */
|
||||
if (cur < 63893864669ull) return 0;
|
||||
#endif
|
||||
|
||||
return r;
|
||||
|
|
|
|||
|
|
@ -144,6 +144,13 @@ void DateTime_CurrentLocal(struct cc_datetime* t) {
|
|||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Crash handling----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
static cc_string GetThreadName(void) {
|
||||
kthread_t* thd = thd_get_current();
|
||||
if (!thd) return String_FromReadonly("(unknown)");
|
||||
|
||||
return String_FromRawArray(thd->label);
|
||||
}
|
||||
|
||||
static void HandleCrash(irq_t evt, irq_context_t* ctx, void* data) {
|
||||
uint32_t code = evt;
|
||||
log_timestamp = false;
|
||||
|
|
@ -152,9 +159,10 @@ static void HandleCrash(irq_t evt, irq_context_t* ctx, void* data) {
|
|||
|
||||
for (;;)
|
||||
{
|
||||
cc_string name = GetThreadName();
|
||||
Platform_LogConst("** CLASSICUBE FATALLY CRASHED **");
|
||||
Platform_Log2("PC: %h, error: %h",
|
||||
&ctx->pc, &code);
|
||||
Platform_Log3("PC: %h, error: %h, thd: %s",
|
||||
&ctx->pc, &code, &name);
|
||||
Platform_LogConst("");
|
||||
|
||||
static const char* const regNames[] = {
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
|||
UploadPartialTexture(part, rowWidth, tex->pixels, tex->width, tex->height, x, y);
|
||||
|
||||
// TODO: Do line by line and only invalidate the actually changed parts of lines?
|
||||
// TODO: Invalidate full tex->size in case of very small textures?
|
||||
sceKernelDcacheWritebackInvalidateRange(tex->pixels, (tex->width * tex->height) * 4);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue