Git Product home page Git Product logo

raddebugger's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raddebugger's Issues

UI does not render / black screen

Hey,

Congratulations on getting this out! Unfortunately, I was not able to run the debugger on my end. The viewport is blank, with occasional UI elements popping in on mouse hover.

Unfortunately, I only have a few details to provide, but please let me know if you need any specifics!

Specs

Windows 11 - 22631.3007
NVIDIA GeForce RTX 3080 Ti - driver 546.33

Media

545RYt0JzU.mp4

Thank you!

View snaps to bottom of file when stepping into a function

Hello, in this clip I'm trying to step into a function. When I do, first it focuses on the disassembly instruction. I step over and it takes takes me to the start of the function. When I step over again, the view scrolls all the way to the bottom of the file. Stepping over again, fixes this and takes me back to where I was in the function.

(I don't think it matters but I'm calling the function through a macro (it doesn't do anything special but some token concatenation to call the function)

2024-01-14_22-42-37.mp4

Can't see parent class members

I can view variables for the type itself, but it doesn't have information about the type that it inherits from. Just tested with latest code (1/15/2024).

97201783-525d-4427-a905-839039257246

Crash when dragging down memory window too far

Thanks for making this cool debugger and open sourcing it! Here's a ui bug I found.

Current build: #27, Win 10

Step 1: Open the memory window and scroll down a little.
Step 2: Drag down until the memory part dissappears.

image
image

F10 does not step into the entry point of an executable with mainCRTStartup() or WinMainCRTStartup()

If I load an executable target into the debugger that has been built without the CRT main() or WinMain() entry points and instead was built with mainCRTStartup() or WinMainCRTStartup(), hitting F10 does not place me at the beginning of my entry point but instead somewhere inside ntdll.dll.

Here's a sample application:

#include <stdio.h>

int mainCRTStartup()
{
    int x = 5;
    int y = 10;

    printf("%d + %d = %d\n", x, y, x + y);
    return 0;
}

and build it with

cl /nologo /O2 /Zi /W3 /WX /GS- main.c /link /fixed /incremental:no /opt:icf /opt:ref /subsystem:console ucrt.lib

If I replace the mainCRTStartup() with main() and run the same command (excluding the ucrt.lib at the end), F10 will step directly into the beginning of main().

"a bad, rare bug" hit while stepping

i was stepping through a program of mine, trying to identify a bug in my code (a tiny program compiled with vs2022), when i got the following error message:

"a bad, rare bug that Jeff found has been detected to occur - attach with debugger now".

image

i cant really provide reproduction steps—i cant say what i was doing more precisely than "stepping through and looking at local variables"—but for the moment i still have this session open at this message. do you want a crash dump? or should i attach vs2022 to raddbg and collect some info?

macOS Build support

Hello,

I know that not a that many people are making games on macOS, but I am one of them.
There is currently no good debugger that works on macOS, so the market is completely devoid of any alternatives to XCode and LLDB (which are both not comparable to this, I think).

RAD Debugger looks immensely useful, so I'd appreciate if Mac-Support could land on the roadmap some day (it probably isn't, currently). Also, I'd make the argument that if Linux is supported, (and that's not exactly used by many professional game devs as 90% are on Windows), Mac makes sense, too.

Crash when address sanitizer is enabled

When I compile my program with /fsanitize=address option, it directly crashes when started in raddbg. raddbg directly jumps to address sanitizer source before it reaches to the main function and Main thread interrupted - 0xc0000005 message appears under the screen. I remember 0xc0000005 means access violation but it occurs before the main function somehow. I tested it with 2 diffent programs and both of them behaved same when /fsanitize=address is set. I also checked them without debugger and with the Visual Studio Debugger for reference and there was no problem in those cases.

PDB with a relative path is searched relative to the debugger

If you specify a relative path to the PDB inside the DLL (In my case, I edit RSDS/PDB70 CODEVIEW), then the debugger looks for the PDB next to itself instead of next to the DLL. Therefore, the PDB cannot be loaded.
For testing I just copied raddbg.exe into the library folder and everything worked as expected.

Indiacte watch variable value change

Right now there is no indication of changed value before and after stepping.
For instance visual studio indicate the change by changing the text colour for that watch variable.

Bitfield support

A simple struct with bitfields is not visible in either the Watch or Locals window.

struct Pointer
{
	uint32_t type : 2;
	uint32_t offset : 30;
};

image

Windows 11 insists raddbg.exe is a virus

Windows is now adament that raddbg.exe is a virus. I tried adding it to the exclusion list but it's too late and that doesn't work.

image

I was initially testing the debugger on a very simple C++ project. It seemed to be working fine.

Then I tried launching the Godot editor and attaching the debugger. This worked. I was exploring the threads to find an interesting one when the debugger and Godot both crashed hard. When I went to re-launch raddbg.exe to my surprise the file was missing. I've not yet found a workaround to keep Windows from deleting it.

Plugin support

Hi,

First of all thanks for opening up this project to the public.

I wonder if you plan to support plugins in the future? That is for both backend (such as different CPUs/systems not supported out of the box) and also visualizers (that can show memory in different ways, etc)

due to some reason all the file content gets deleted when opened simultaneously in another editor.

I do not have an exact way to reproduce it. Below is my setup:

Win 10
VS code for code editing
raddebugger for debugging

I have observed multiple times during last couple of days the file which i was debugging and at the same time when I try to edit inside VS code and try to save it gets me an warning of "content change from other process" to overwrite or not.

This was annoying as I lost couple of hours of work in between.

Below is the error in VS code while the same file was open in raddebugger.
image

It looks like intermittent.

File timestamps are not Local

The filetimes displayed are incorrect, they are in UTC instead of local time. This also causes an issue which can cause Jan 0 to appear in the timestamp.

file_mods

Could not commit value successfully in register view

If I double click a value in the register view (so it becomes selected) and then I click so it's unselected I get a warning in the statusbar Could not commit value successfully but I never changed the value.

Support more types in Memory View

This is more of a feature request than a bug, but in the memory view only bytes are shown (next to the current selected value preview)

It would be nice to support all the common types: s8, u8, s16, u16, s32, u32, s64, u64, f32 and f64 in hex and integer. In MSVC you can right click and get a context menu up to select between these. Also the ability to switch endian mode is useful now and then.

Crash with access violation on null pointer

Thanks for the wonderful tool! I figured I'd try it out immediately, maybe in a somewhat unintended use-case (a random Rust application I had laying around). But after a while of not paying attention the debugger crashed with an access violation on a 0 pointer.

Is there some logging I could give you that would make hunting this down easier?

Templated function not displaying templated variables correctly in watch window

Hey, first off congratz on release!

Anyways, I have this templated function that creates a "T obj", where 'T' is the template typename.
Inspecting "obj" in the watch window shows nothing. Doing "(T *)&obj" says T is an unknown identifier. I thought maybe template support isn't their yet but what's interesting is that explicitly casting "&obj" to the instantiated type only shows parts of the struct members ... not all. Here are pictures of watch window in raddbg and visual studio

rad_watch_window

msvc_watch_window

Access violation when closing panel

It only happens in some specific panel configurations.

I can consistently trigger it from the default configuration by deleting the following panels: Targets, Scheduler, Disasm, Output/Watch/Memory and then finally trying to delete the main panel:
imagen
imagen

I'm attaching a test configuration (Added an extension since github requires it before it lets me upload the file)
default.raddbg_user.txt

Breakpoint and stepping doesn't work in the source file. Goes to disassembly.

Hello there !
I tested today your debugger, it is a promising project that reminds me of RemedyBG but with a way bigger scope.

I had one big issue today:

I tried it on a dummy project I had at home that I compiled using mstorjso llvm-clang-mingw-ucrt toolchain 16.0.6 and when I put a breakpoint in the source code, it gets reached but opens the dissasm window instead of the source code. And when I step in the code, it keeps stepping in the ASM instead of the source code.

I checked and the PDB was properly loaded. Am I missing ? Is there a source-mode stepping we need to activate ?

Cheers,
Scr3amer

Unicode support issues

The source code view area has some Unicode issues.

Simple test (║Тест║):

image

Windows 11.

`SetThreadDescription` doesn't appear to be respected

When launching my app it looks like only 2 threads have names in the debugger while we name all of our thread. Rust seems to be using the newer SetThreadDescription API rather then the older RaiseException method of naming threads, potentially this new api isn't yet supported?

raddbg should warn when a source file is newer than executable

Currently, raddbg does not warn when the source file (e.g., one with a breakpoint in it) is newer than the executable. This can cause confusion when breakpoints do not match with the source code. Visual Studio, gdb, and lldb warn or otherwise indicate when this situation occurs, and raddbg should too.

Fatal Exception 0x80000003

Getting this fatal exception on my work (office) project.
image
raddebugger and target appears to be stuck while debugger is not connected, but when I connect the raddebugger (0.9.4 Alpha) to VS debugger and then run the target from raddebugger these exceptions popped.

I don't know how to reproduce it. This exception keeps popping as target program loads dlls and raddebugger tries to create .raddbg files

Linux build support

I started doing this but i figured it'd be a good idea to ask here before I get too deep in it. Are there any plans to support Linux as an official build target? I'm working slowly on my fork and I've finally got metadesk kinda running (tho it's still segfaulting) so I'm happy to make a PR if/when I get it fully running.

Watch window expression doesn’t parse casting pointer to pointer to array

For example, with the following simple c program:

#include <stdio.h>
int main(){
    const char* foo = "hello world";
    puts(foo);
    return 0;
}

In the watch window, if you write (char(*)[8])foo for example (casting foo to a pointer to an array of 8 chars), it complains with “Missing )”.

You also can’t dereference it (*(char(*)[8])foo) to get a watch expression of an array.

[rust] Some values show up incorrectly

I'm not sure how eager this project is in supporting Rust and I don't expect much at the moment, but since the Rust compiler outputs regular pdb's most of the features to work out of the box. However, in this particular case some values are displayed incorrectly.

image

Visual Studio for reference
image

My expectation would be that fence_value would be 1 (rust variables are immutable by default), and self would also contain a sensible value.

dxgi flipmodel fatal error

Hi, I got a fatal exception as follows, no command line option provided, just double click the raddbg.exe:

---------------------------
Fatal Exception
---------------------------
A fatal exception (code 0xc0000005) occurred. The process is terminating.
---------------------------
OK   
---------------------------

My test env is a release version of FLARE-VM:

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

The stack trace with the pdb loaded, I can share the trace/run file if needed:

0:000> ~0k
 # Child-SP          RetAddr               Call Site
00 00000000`00146270 6e61204c`4149544e     ntdll!RtlCaptureContext2+0x40b
01 00000000`00148c20 535f4947`58442064     0x6e61204c`4149544e
02 00000000`00148c28 45464645`5f504157     0x535f4947`58442064
03 00000000`00148c30 5f50494c`465f5443     0x45464645`5f504157
04 00000000`00148c38 29445241`43534944     0x5f50494c`465f5443
05 00000000`00148c40 65736165`6c50202e     0x29445241`43534944
06 00000000`00148c48 65646973`6e6f6320     0x65736165`6c50202e
07 00000000`00148c50 69746164`70752072     0x65646973`6e6f6320
08 00000000`00148c58 2072756f`7920676e     0x69746164`70752072
09 00000000`00148c60 74616369`6c707061     0x2072756f`7920676e
0a 00000000`00148c68 6c206f74`206e6f69     0x74616369`6c707061
0b 00000000`00148c70 20656761`72657665     0x6c206f74`206e6f69
0c 00000000`00148c78 646f6d2d`70696c66     0x20656761`72657665
0d 00000000`00148c80 20706177`73206c65     0x646f6d2d`70696c66
0e 00000000`00148c88 20737463`65666665     0x20706177`73206c65
0f 00000000`00148c90 66656e65`62206f74     0x20737463`65666665
10 00000000`00148c98 206d6f72`66207469     0x66656e65`62206f74
11 00000000`00148ca0 70206e72`65646f6d     0x206d6f72`66207469
12 00000000`00148ca8 7461746e`65736572     0x70206e72`65646f6d
13 00000000`00148cb0 61686e65`206e6f69     0x7461746e`65736572
14 00000000`00148cb8 73746e65`6d65636e     0x61686e65`206e6f69
15 00000000`00148cc0 69206572`6f4d202e     0x73746e65`6d65636e
16 00000000`00148cc8 6974616d`726f666e     0x69206572`6f4d202e
17 00000000`00148cd0 76612073`69206e6f     0x6974616d`726f666e
18 00000000`00148cd8 20656c62`616c6961     0x76612073`69206e6f
19 00000000`00148ce0 3a707474`68207461     0x20656c62`616c6961
1a 00000000`00148ce8 736d2e61`6b612f2f     0x3a707474`68207461
1b 00000000`00148cf0 696c6669`6778642f     0x736d2e61`6b612f2f
1c 00000000`00148cf8 002e6c65`646f6d70     0x696c6669`6778642f
1d 00000000`00148d00 00000000`00148da0     0x002e6c65`646f6d70
1e 00000000`00148d08 00007ff9`a32016aa     0x148da0
1f 00000000`00148d10 00007ff9`a3201642     ntdll!RtlWalkFrameChain+0x2a
20 00000000`00148d40 00007ff9`9f129589     ntdll!RtlCaptureStackBackTrace+0x42
21 00000000`00148d70 00007ff9`9f1781e4     dxgi!DXGIDeclareAdapterRemovalSupport+0x1249
22 00000000`00148f70 00007ff9`9f15c166     dxgi!DXGIDumpJournal+0x254
23 00000000`00148fa0 00007ff9`9f14573a     dxgi!PIXEndCapture+0x1b466
24 00000000`00148fd0 00007ff9`9f1258bf     dxgi!PIXEndCapture+0x4a3a
25 00000000`00149870 00007ff9`9f13b949     dxgi!DXGIReportAdapterConfiguration+0x314f
26 00000000`00149b80 00007ff9`9f17f389     dxgi!CompatString+0xfee9
27 00000000`00149cf0 00007ff9`9f17f0db     dxgi!DXGIGetDebugInterface1+0x3b39
28 00000000`00149d80 00007ff7`dfa27620     dxgi!DXGIGetDebugInterface1+0x388b
29 00000000`00149f20 00007ff7`dfac1f8b     raddbg!r_window_equip+0x250 [C:\devel\raddebugger\src\render\d3d11\render_d3d11.cpp @ 469] 
2a 00000000`0014a040 00007ff7`dfb11e55     raddbg!df_window_open+0x16b [C:\devel\raddebugger\src\df\gfx\df_gfx.c @ 1082] 
2b 00000000`0014a3a0 00007ff7`dfb2103c     raddbg!df_gfx_begin_frame+0x3a25 [C:\devel\raddebugger\src\df\gfx\df_gfx.c @ 11657] 
2c 00000000`0014cea0 00007ff7`dfb384a6     raddbg!update_and_render+0xcec [C:\devel\raddebugger\src\raddbg\raddbg.c @ 201] 
2d 00000000`0014e0c0 00007ff7`df97b7c7     raddbg!entry_point+0x1616 [C:\devel\raddebugger\src\raddbg\raddbg.c @ 515] 
2e 00000000`0014fc50 00007ff7`dfba9482     raddbg!WinMain+0x2d7 [C:\devel\raddebugger\src\raddbg\raddbg_main.cpp @ 154] 
2f (Inline Function) --------`--------     raddbg!invoke_main+0x21 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 102] 
30 00000000`0014fef0 00007ff9`a22c7344     raddbg!__scrt_common_main_seh+0x106 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
31 00000000`0014ff30 00007ff9`a32026b1     KERNEL32!BaseThreadInitThunk+0x14
32 00000000`0014ff60 00000000`00000000     ntdll!RtlUserThreadStart+0x21
0:000> da /c50 00000000`00148b30 l0n1000
00000000`00148b30  "IDXGIFactory::CreateSwapChain: Blt-model swap effects (DXGI_SWAP_EFFECT_DISCARD "
00000000`00148b80  "and DXGI_SWAP_EFFECT_SEQUENTIAL) are legacy swap effects that are predominantly "
00000000`00148bd0  "superceded by their flip-model counterparts (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL an"
00000000`00148c20  "d DXGI_SWAP_EFFECT_FLIP_DISCARD). Please consider updating your application to l"
00000000`00148c70  "everage flip-model swap effects to benefit from modern presentation enhancements"
00000000`00148cc0  ". More information is available at http://aka.ms/dxgiflipmodel."

Loading Profile Overwrites Selected File

Clicking on the green or orange button in the top right of the screen to select a user profile/settings, the program prompts the user to load a file. Upon selecting the file in the center panel, the file appears to be being truncated and replaced with user settings.

// raddbg profile file

/// targets ///////////////////////////////////////////////////////////////////

target:
{
  exe:               "renderer.exe"
  arguments:         ""
  working_directory: "../hardware_renderer"
  active:            1
}

/// exception code filters ////////////////////////////////////////////////////

exception_code_filters:
{
  win32_ctrl_c: 1
  win32_ctrl_break: 1
  win32_win_rt_originate_error: 0
  win32_win_rt_transform_error: 0
  win32_rpc_call_cancelled: 0
  win32_datatype_misalignment: 0
  win32_access_violation: 1
  win32_in_page_error: 0
  win32_invalid_handle: 1
  win32_not_enough_quota: 0
  win32_illegal_instruction: 0
  win32_cannot_continue_exception: 0
  win32_invalid_exception_disposition: 0
  win32_array_bounds_exceeded: 0
  win32_floating_point_denormal_operand: 0
  win32_floating_point_division_by_zero: 0
  win32_floating_point_inexact_result: 0
  win32_floating_point_invalid_operation: 0
  win32_floating_point_overflow: 0
  win32_floating_point_stack_check: 0
  win32_floating_point_underflow: 0
  win32_integer_division_by_zero: 0
  win32_integer_overflow: 0
  win32_privileged_instruction: 0
  win32_stack_overflow: 0
  win32_unable_to_locate_dll: 0
  win32_ordinal_not_found: 0
  win32_entry_point_not_found: 0
  win32_dll_initialization_failed: 0
  win32_floating_point_sse_multiple_faults: 0
  win32_floating_point_sse_multiple_traps: 0
  win32_assertion_failed: 1
  win32_module_not_found: 0
  win32_procedure_not_found: 0
  win32_sanitizer_error_detected: 1
  win32_sanitizer_raw_access_violation: 0
}

/// control settings //////////////////////////////////////////////////////////

solo_stepping_mode: 0

Cannot build from directory with spaces in path

I tried building from a path that contained the directory Downloaded Projects. Doing so causes the file base.natvis to not be found with the error:

LINK : fatal error LNK1181: cannot open input file 'Projects\Raddbg\raddebugger\\src\natvis\base.natvis'

The build then fails.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.