mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-05 15:35:42 +00:00
fix torture; adjust raddbg test exemplar dumping to avoid dumping info for anything other than the main module, so that we don't get non-deterministic dumps (for e.g. system PDBs)
This commit is contained in:
+15
-1
@@ -6,6 +6,10 @@
|
||||
** stepping, breakpoints, evaluation, cross-module calls.
|
||||
*/
|
||||
|
||||
#if defined(__clang__)
|
||||
#define _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH 1
|
||||
#endif
|
||||
|
||||
#if _WIN32 && _DEBUG
|
||||
#pragma comment(linker, "/nodefaultlib:libcmt")
|
||||
#pragma comment(lib, "libcmtd")
|
||||
@@ -2363,7 +2367,8 @@ overloaded_function(int x){
|
||||
// NOTE(allen): Control Flow Stepping
|
||||
|
||||
static void
|
||||
control_flow_stepping_tests(void){
|
||||
control_flow_stepping_tests(void)
|
||||
{
|
||||
{
|
||||
int a = 1;
|
||||
if (a < 1){
|
||||
@@ -2532,6 +2537,15 @@ control_flow_stepping_tests(void){
|
||||
} while (i < 10);
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
for (int i = 0; i < 1;
|
||||
++i, ({ goto exit; }))
|
||||
{
|
||||
int x = 0;
|
||||
}
|
||||
exit:;
|
||||
#endif
|
||||
|
||||
{
|
||||
int i = 17;
|
||||
|
||||
|
||||
@@ -13059,6 +13059,7 @@ rd_frame(void)
|
||||
RDI_Symbol *procedure = rdi_procedure_from_voff(rdi, voff);
|
||||
String8 name = fully_qualified_str8_from_rdi_symbol(scratch.arena, rdi, procedure);
|
||||
name = escaped_from_raw_str8(scratch.arena, name);
|
||||
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " ip_module: \"%S\"\n", str8_skip_last_slash(module->string));
|
||||
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " ip_voff: 0x%I64x\n", voff);
|
||||
str8_list_pushf(rd_state->cmd_output_arena, &rd_state->cmd_outputs, " ip_voff_symbol: \"%S\"\n", name);
|
||||
access_close(access);
|
||||
|
||||
@@ -181,15 +181,20 @@ rd_test__stepping_regressions(Arena *arena, TestCtx *ctx, String8 target_binary,
|
||||
// rjf: if we are ready for the next operation, then accumulate deterministic log info
|
||||
if(ready_for_next_operation)
|
||||
{
|
||||
MD_Node *lines = md_child_from_string(state, s("lines"), 0);
|
||||
MD_Node *ip_voff = md_child_from_string(state, s("ip_voff"), 0);
|
||||
MD_Node *ip_voff_symbol = md_child_from_string(state, s("ip_voff_symbol"), 0);
|
||||
String8 lines_dump = md_string_from_tree(scratch.arena, lines);
|
||||
String8 ip_voff_dump = md_string_from_tree(scratch.arena, ip_voff);
|
||||
String8 ip_voff_symbol_dump = md_string_from_tree(scratch.arena, ip_voff_symbol);
|
||||
str8_list_push(scratch.arena, &test_log_strings, lines_dump);
|
||||
str8_list_push(scratch.arena, &test_log_strings, ip_voff_dump);
|
||||
str8_list_push(scratch.arena, &test_log_strings, ip_voff_symbol_dump);
|
||||
MD_Node *ip_module = md_child_from_string(state, s("ip_module"), 0);
|
||||
String8 ip_module_name = ip_module->first->string;
|
||||
if(str8_match(str8_chop_last_dot(ip_module_name), target_binary, 0))
|
||||
{
|
||||
MD_Node *lines = md_child_from_string(state, s("lines"), 0);
|
||||
MD_Node *ip_voff = md_child_from_string(state, s("ip_voff"), 0);
|
||||
MD_Node *ip_voff_symbol = md_child_from_string(state, s("ip_voff_symbol"), 0);
|
||||
String8 lines_dump = md_string_from_tree(scratch.arena, lines);
|
||||
String8 ip_voff_dump = md_string_from_tree(scratch.arena, ip_voff);
|
||||
String8 ip_voff_symbol_dump = md_string_from_tree(scratch.arena, ip_voff_symbol);
|
||||
str8_list_push(scratch.arena, &test_log_strings, lines_dump);
|
||||
str8_list_push(scratch.arena, &test_log_strings, ip_voff_dump);
|
||||
str8_list_push(scratch.arena, &test_log_strings, ip_voff_symbol_dump);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: are we without line info? -> step out
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "mdesk/mdesk.h"
|
||||
#include "metagen/metagen.h"
|
||||
#include "window_manager/window_manager_inc.h"
|
||||
#include "http/http_inc.h"
|
||||
#include "symbol_server/symbol_server_inc.h"
|
||||
#include "config/config_inc.h"
|
||||
#include "content/content.h"
|
||||
#include "file_stream/file_stream.h"
|
||||
@@ -111,6 +113,8 @@
|
||||
#include "mdesk/mdesk.c"
|
||||
#include "metagen/metagen.c"
|
||||
#include "window_manager/window_manager_inc.c"
|
||||
#include "http/http_inc.c"
|
||||
#include "symbol_server/symbol_server_inc.c"
|
||||
#include "config/config_inc.c"
|
||||
#include "content/content.c"
|
||||
#include "file_stream/file_stream.c"
|
||||
|
||||
Reference in New Issue
Block a user