mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-28 16:43:20 -08:00
checkpoint on symbol server
This commit is contained in:
1 parent
536ca53d18
commit
b22f9f2d8b
21 files changed
+736
-99
No files matched your search
@@ -10684,7 +10684,8 @@ rd_init(CmdLine *cmdln)
|
||||
|
||||
// rjf: set up update check http ring & send request
|
||||
{
|
||||
rd_state->update_check_http_ring = guarded_ring_alloc(arena, KB(8));
|
||||
rd_state->update_check_arena = arena_alloc();
|
||||
rd_state->update_check_http_ring = guarded_ring_alloc(rd_state->update_check_arena, KB(8));
|
||||
HTTP_RequestParams p =
|
||||
{
|
||||
.id = 1,
|
||||
@@ -11102,12 +11103,24 @@ rd_frame(void)
|
||||
//
|
||||
if(!rd_state->got_update_check)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
HTTP_Response response = {0};
|
||||
if(http_pop_response(scratch.arena, rd_state->update_check_http_ring, &response, 0))
|
||||
// rjf: pop all responses that we can
|
||||
B32 done = 0;
|
||||
for(HTTP_Response response = {0}; http_pop_response(rd_state->update_check_arena, rd_state->update_check_http_ring, &response, 0);)
|
||||
{
|
||||
str8_list_push(rd_state->update_check_arena, &rd_state->update_check_response_body_pieces, response.body);
|
||||
if(response.has_more == 0)
|
||||
{
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: if we're done -> parse response & determine if there is a new version
|
||||
if(done)
|
||||
{
|
||||
rd_state->got_update_check = 1;
|
||||
MD_Node *root = md_tree_from_string(scratch.arena, response.body)->first;
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
String8 response_body = str8_list_join(rd_state->update_check_arena, &rd_state->update_check_response_body_pieces, 0);
|
||||
MD_Node *root = md_tree_from_string(scratch.arena, response_body)->first;
|
||||
MD_Node *html_url = md_child_from_string(root, s("html_url"), 0);
|
||||
String8 newest_release_url = html_url->first->string;
|
||||
U64 tag_pos = str8_find_needle(newest_release_url, 0, s("tag/v"), 0);
|
||||
@@ -11120,8 +11133,13 @@ rd_frame(void)
|
||||
{
|
||||
rd_state->newer_update_available = 1;
|
||||
}
|
||||
guarded_ring_release(rd_state->update_check_http_ring);
|
||||
arena_release(rd_state->update_check_arena);
|
||||
rd_state->update_check_arena = 0;
|
||||
rd_state->update_check_http_ring = 0;
|
||||
MemoryZeroStruct(&rd_state->update_check_response_body_pieces);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
@@ -17380,7 +17398,9 @@ rd_frame(void)
|
||||
D_Entity *module = d_entity_from_handle(evt->entity);
|
||||
D_Entity *debug_info_path = d_entity_child_from_kind(module, D_EntityKind_DebugInfoPath);
|
||||
String8 new_path = debug_info_path->string;
|
||||
if(new_path.size != 0 && file_path_exists(new_path))
|
||||
B32 file_exists = file_path_exists(new_path);
|
||||
B32 file_is_pending = (!file_exists ? smsv_status_from_local_path(new_path) == SMSV_Status_Pending : 0);
|
||||
if(new_path.size != 0 && (file_exists || file_is_pending))
|
||||
{
|
||||
CFG_NodePtrList dbg_infos = cfg_node_top_level_list_from_string(scratch.arena, str8_lit("debug_info"));
|
||||
B32 path_found = 0;
|
||||
|
||||
@@ -397,6 +397,8 @@ struct RD_State
|
||||
// rjf: update checker
|
||||
B32 got_update_check;
|
||||
B32 newer_update_available;
|
||||
Arena *update_check_arena;
|
||||
String8List update_check_response_body_pieces;
|
||||
GuardedRing *update_check_http_ring;
|
||||
|
||||
// rjf: config bucket paths
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
//~ rjf: post-0.9.26 TODO notes
|
||||
//
|
||||
// [ ] unwinding crash - f5 on bp in w32_http_status_callback to repro
|
||||
// [ ] unwinding in jit page - fail
|
||||
// [ ] jeff stepping bug
|
||||
// [ ] wassim memory bug
|
||||
// [ ] switch off spoofs for step-over
|
||||
@@ -514,6 +515,34 @@ entry_point(CmdLine *cmd_line)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
|
||||
//- TODO(rjf): test symbol server download
|
||||
#if 0
|
||||
{
|
||||
GuardedRing *out_ring = guarded_ring_alloc(scratch.arena, KB(64));
|
||||
{
|
||||
HTTP_RequestParams p =
|
||||
{
|
||||
.id = 1,
|
||||
.method = HTTP_Method_Get,
|
||||
.url = s("https://msdl.microsoft.com/download/symbols/ntdll.pdb/E84AF4A1E3CDFABC99A41209581EB6861/ntdll.pdb"),
|
||||
};
|
||||
http_push_request(out_ring, &p, max_U64);
|
||||
String8List pieces = {0};
|
||||
for(HTTP_Response r = {0}; http_pop_response(scratch.arena, out_ring, &r, max_U64);)
|
||||
{
|
||||
str8_list_push(scratch.arena, &pieces, r.body);
|
||||
if(r.has_more == 0)
|
||||
{
|
||||
int x = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int x = 0;
|
||||
}
|
||||
guarded_ring_release(out_ring);
|
||||
}
|
||||
#endif
|
||||
|
||||
//- rjf: unpack command line arguments
|
||||
ExecMode exec_mode = ExecMode_Normal;
|
||||
B32 auto_run = 0;
|
||||
|
||||
Reference in new issue
Block a user