mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 06:48:41 +00:00
todo
This commit is contained in:
committed by
Ryan Fleury
parent
cc93bf4439
commit
19cee2d646
@@ -201,7 +201,17 @@ wm_window_focus(WM_Window handle)
|
|||||||
{
|
{
|
||||||
if(wm_window_match(handle, wm_window_zero())) {return;}
|
if(wm_window_match(handle, wm_window_zero())) {return;}
|
||||||
LNX_WM_Window *w = (LNX_WM_Window *)handle.u64[0];
|
LNX_WM_Window *w = (LNX_WM_Window *)handle.u64[0];
|
||||||
XSetInputFocus(lnx_wm_state->display, w->window, RevertToNone, CurrentTime);
|
//
|
||||||
|
// TODO: if the target is lightweight, the debugger may launch it even before the first frame is drawn;
|
||||||
|
// this is a problem because XSetInputFocus is now called before XMapWindow, we need a guard
|
||||||
|
// to prevent an X server error:
|
||||||
|
//
|
||||||
|
// X Error of failed request: BadMatch (invalid parameter attributes)
|
||||||
|
// Major opcode of failed request: 42 (X_SetInputFocus)
|
||||||
|
// Serial number of failed request: 373
|
||||||
|
// Current serial number in output stream: 374
|
||||||
|
//
|
||||||
|
XSetInputFocus(os_lnx_gfx_state->display, w->window, RevertToNone, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal B32
|
internal B32
|
||||||
|
|||||||
@@ -4396,90 +4396,6 @@ TEST(second_member_header)
|
|||||||
T_Ok(g_last_exit_code == 0);
|
T_Ok(g_last_exit_code == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
TEST(defer_imp_link)
|
|
||||||
{
|
|
||||||
T_COFF_DefLib bar_lib_any = {
|
|
||||||
.members = (T_COFF_DefLibMember[]){
|
|
||||||
{
|
|
||||||
.type = T_COFF_DefLibMember_DllImportStatic,
|
|
||||||
.dll_import = { .name = "bar.dll" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.type = T_COFF_DefLibMember_Import,
|
|
||||||
.import = { "bar.dll", "bar", COFF_ImportBy_Name, COFF_ImportHeader_Code, .hit_or_ordinal = 0 }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.type = T_COFF_DefLibMember_Obj,
|
|
||||||
.obj = {
|
|
||||||
.machine = T_COFF_DefSetMachine(X64),
|
|
||||||
.sections = (T_COFF_DefSection[]){
|
|
||||||
{
|
|
||||||
"text", ".text", str8_lit_comp("\xff\x25\x00\x00\x00\x00"), .flags = "rx:code"
|
|
||||||
},
|
|
||||||
{0}
|
|
||||||
},
|
|
||||||
.symbols = (T_COFF_DefSymbol[]){
|
|
||||||
T_COFF_DefSymbol_Undef("__imp_bar"),
|
|
||||||
T_COFF_DefSymbol_ExternFunc("qwe", "text", 0),
|
|
||||||
{0},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{0}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
T_COFF_DefLib foo_lib_any = {
|
|
||||||
.members = (T_COFF_DefLibMember[]){
|
|
||||||
{
|
|
||||||
.type = T_COFF_DefLibMember_DllImportStatic,
|
|
||||||
.dll_import = { .name = "foo.dll" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.type = T_COFF_DefLibMember_Import,
|
|
||||||
.import = { "foo.dll", "bar", COFF_ImportBy_Name, COFF_ImportHeader_Code, .hit_or_ordinal = 0 }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
.type = T_COFF_DefLibMember_Obj,
|
|
||||||
.obj = {
|
|
||||||
.machine = T_COFF_DefSetMachine(X64),
|
|
||||||
.sections = (T_COFF_DefSection[]){
|
|
||||||
{
|
|
||||||
"text", ".text",
|
|
||||||
str8_lit_comp("\xff\x25\x00\x00\x00\x00"),
|
|
||||||
.flags = "rx:code",
|
|
||||||
.relocs = (T_COFF_DefReloc[]){
|
|
||||||
T_COFF_DefReloc(X64_Rel32, 2, "bar"),
|
|
||||||
{0}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{0}
|
|
||||||
},
|
|
||||||
.symbols = (T_COFF_DefSymbol[]){
|
|
||||||
T_COFF_DefSymbol_Undef("bar"),
|
|
||||||
T_COFF_DefSymbol_Undef("qwe"),
|
|
||||||
T_COFF_DefSymbol_ExternFunc("thunk", "text", 0),
|
|
||||||
{0},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{0}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
String8 bar_lib = t_coff_from_def_lib(arena, bar_lib_any);
|
|
||||||
String8 foo_lib = t_coff_from_def_lib(arena, foo_lib_any);
|
|
||||||
|
|
||||||
T_Ok(t_write_file(str8_lit("bar.lib"), bar_lib));
|
|
||||||
T_Ok(t_write_file(str8_lit("foo.lib"), foo_lib));
|
|
||||||
T_Ok(t_write_entry_obj());
|
|
||||||
|
|
||||||
t_invoke_linkerf("/subsystem:console /entry:entry /out:a.exe bar.lib foo.lib entry.obj /include:thunk");
|
|
||||||
T_Ok(g_last_exit_code == 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
TEST(defer_impl_link_to_second_search_pass)
|
TEST(defer_impl_link_to_second_search_pass)
|
||||||
{
|
{
|
||||||
T_Ok(t_write_def_obj("imp_ref.obj", (T_COFF_DefObj){
|
T_Ok(t_write_def_obj("imp_ref.obj", (T_COFF_DefObj){
|
||||||
@@ -6996,6 +6912,90 @@ TEST(fold_with_largest_align)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
TEST(defer_imp_link)
|
||||||
|
{
|
||||||
|
T_COFF_DefLib bar_lib_any = {
|
||||||
|
.members = (T_COFF_DefLibMember[]){
|
||||||
|
{
|
||||||
|
.type = T_COFF_DefLibMember_DllImportStatic,
|
||||||
|
.dll_import = { .name = "bar.dll" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.type = T_COFF_DefLibMember_Import,
|
||||||
|
.import = { "bar.dll", "bar", COFF_ImportBy_Name, COFF_ImportHeader_Code, .hit_or_ordinal = 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.type = T_COFF_DefLibMember_Obj,
|
||||||
|
.obj = {
|
||||||
|
.machine = T_COFF_DefSetMachine(X64),
|
||||||
|
.sections = (T_COFF_DefSection[]){
|
||||||
|
{
|
||||||
|
"text", ".text", str8_lit_comp("\xff\x25\x00\x00\x00\x00"), .flags = "rx:code"
|
||||||
|
},
|
||||||
|
{0}
|
||||||
|
},
|
||||||
|
.symbols = (T_COFF_DefSymbol[]){
|
||||||
|
T_COFF_DefSymbol_Undef("__imp_bar"),
|
||||||
|
T_COFF_DefSymbol_ExternFunc("qwe", "text", 0),
|
||||||
|
{0},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{0}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
T_COFF_DefLib foo_lib_any = {
|
||||||
|
.members = (T_COFF_DefLibMember[]){
|
||||||
|
{
|
||||||
|
.type = T_COFF_DefLibMember_DllImportStatic,
|
||||||
|
.dll_import = { .name = "foo.dll" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.type = T_COFF_DefLibMember_Import,
|
||||||
|
.import = { "foo.dll", "bar", COFF_ImportBy_Name, COFF_ImportHeader_Code, .hit_or_ordinal = 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.type = T_COFF_DefLibMember_Obj,
|
||||||
|
.obj = {
|
||||||
|
.machine = T_COFF_DefSetMachine(X64),
|
||||||
|
.sections = (T_COFF_DefSection[]){
|
||||||
|
{
|
||||||
|
"text", ".text",
|
||||||
|
str8_lit_comp("\xff\x25\x00\x00\x00\x00"),
|
||||||
|
.flags = "rx:code",
|
||||||
|
.relocs = (T_COFF_DefReloc[]){
|
||||||
|
T_COFF_DefReloc(X64_Rel32, 2, "bar"),
|
||||||
|
{0}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{0}
|
||||||
|
},
|
||||||
|
.symbols = (T_COFF_DefSymbol[]){
|
||||||
|
T_COFF_DefSymbol_Undef("bar"),
|
||||||
|
T_COFF_DefSymbol_Undef("qwe"),
|
||||||
|
T_COFF_DefSymbol_ExternFunc("thunk", "text", 0),
|
||||||
|
{0},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{0}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
String8 bar_lib = t_coff_from_def_lib(arena, bar_lib_any);
|
||||||
|
String8 foo_lib = t_coff_from_def_lib(arena, foo_lib_any);
|
||||||
|
|
||||||
|
T_Ok(t_write_file(str8_lit("bar.lib"), bar_lib));
|
||||||
|
T_Ok(t_write_file(str8_lit("foo.lib"), foo_lib));
|
||||||
|
T_Ok(t_write_entry_obj());
|
||||||
|
|
||||||
|
t_invoke_linkerf("/subsystem:console /entry:entry /out:a.exe bar.lib foo.lib entry.obj /include:thunk");
|
||||||
|
T_Ok(g_last_exit_code == 0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
TEST(reloc_apply_off_out_of_bounds)
|
TEST(reloc_apply_off_out_of_bounds)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user