mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 14:58:08 +00:00
step into tests
This commit is contained in:
committed by
Ryan Fleury
parent
09afff7957
commit
79cb6c3c5e
@@ -0,0 +1,40 @@
|
|||||||
|
// TODO: step into alg needs to detect that it is about to step into a thunk and place breakpoint, respective to OS,
|
||||||
|
// where thunk calls into resolved function
|
||||||
|
//
|
||||||
|
// test: {
|
||||||
|
// windows: {
|
||||||
|
// compile: "/Od /Z7 /c main.c module.c"
|
||||||
|
// link: "/fixed /debug:full /dll module.obj"
|
||||||
|
// link: "/fixed /debug:full /entry:main kernel32.lib module.lib delayimp.lib main.obj /out:main.exe /delayload:module.dll /incremental:no"
|
||||||
|
// launch: "main.exe"
|
||||||
|
// }
|
||||||
|
// linux: {
|
||||||
|
// compile: "-O0 -g module.c -fPIC -shared -o libmodule.so"
|
||||||
|
// compile: "-O0 -g main.c -L. -lmodule -o main -Wl,-rpath,%CWD%"
|
||||||
|
// launch: "./main"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
|
||||||
|
/// file: "module.c"
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
__declspec(dllexport)
|
||||||
|
#endif
|
||||||
|
int foo(int a)
|
||||||
|
{ /// 6: { at, run }
|
||||||
|
return a + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// file: "main.c"
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
__declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
int foo();
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{ /// 1: { step_into, at, step_over }
|
||||||
|
foo(123); /// 2: { at, step_into }
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/// test: {
|
||||||
|
/// windows: {
|
||||||
|
/// compile: "/Od /Z7 /c main.c module.c"
|
||||||
|
/// link: "/fixed /debug:full /dll module.obj"
|
||||||
|
/// link: "/fixed /debug:full module.lib main.obj /out:main.exe /incremental:no"
|
||||||
|
/// launch: "main.exe"
|
||||||
|
/// }
|
||||||
|
/// linux: {
|
||||||
|
/// compile: "-O0 -g module.c -fPIC -shared -o libmodule.so"
|
||||||
|
/// compile: "-O0 -g main.c -L. -lmodule -o main -Wl,-rpath,%CWD%,-z,now -fno-plt"
|
||||||
|
/// launch: "./main"
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
///
|
||||||
|
|
||||||
|
/// file: "module.c"
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
__declspec(dllexport)
|
||||||
|
#endif
|
||||||
|
int foo(int a)
|
||||||
|
{ /// 3: at
|
||||||
|
return a + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// file: "main.c"
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
__declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
int foo();
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{ /// 1: { step_into, at, step_over }
|
||||||
|
foo(123); /// 2: { at, step_into }
|
||||||
|
}
|
||||||
|
|
||||||
@@ -757,7 +757,7 @@ T_RunSig(dbg_script_runner)
|
|||||||
|
|
||||||
// debugger is ready -- now invoke script
|
// debugger is ready -- now invoke script
|
||||||
if (t_dbg_script_invoke(&script, T_Dbg_DefaultTimeout) == 0) {
|
if (t_dbg_script_invoke(&script, T_Dbg_DefaultTimeout) == 0) {
|
||||||
t_errrof("ERROR: %S: failed to run to completion\n", user_data);
|
t_errorf("ERROR: %S: failed to run to completion\n", user_data);
|
||||||
T_Ok(0);
|
T_Ok(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -782,7 +782,7 @@ t_dbg_register_script_tests(Arena *arena, String8 folder_path)
|
|||||||
Temp scratch = scratch_begin(&arena, 1);
|
Temp scratch = scratch_begin(&arena, 1);
|
||||||
|
|
||||||
if ( ! folder_path_exists(folder_path)) {
|
if ( ! folder_path_exists(folder_path)) {
|
||||||
t_errof("ERROR: this folder does not exists: %S\n", folder_path);
|
t_errorf("ERROR: this folder does not exists: %S\n", folder_path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user