Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial start of the USB Debugger #165

Merged
merged 14 commits into from
Mar 10, 2024
Merged

Conversation

fysnet
Copy link
Collaborator

@fysnet fysnet commented Dec 10, 2023

This is the start of the Experimental USB Debugger (currently for the Windows platform only).

Currently only supports the UHCI and xHCI controllers. The remaining function of these two controllers and the two remaining controllers are in the works and will be added to when time allows.

The User.dbk has been updated with (temporary) html files at https://www.fysnet.net/bochs/user/index.html showing the process to invoke and use the USB debugger (Section 5.8).

In its completion, this debugger will allow you to view and modify most aspects of the specified USB controller. For example, currently you can view and modify a TRB listed in the xHCI's Command or Event Ring. Other aspects will be added.

I do not use and am not fluent in the use of configure, configure.ac, and associated configuration files. I also don't use the gui/Makefile.in file.

Someone that is more fluent in the way these files work, please add the necessary items to successfully compile this PR.

@fysnet fysnet marked this pull request as ready for review December 10, 2023 19:10
@stlintel stlintel marked this pull request as draft December 11, 2023 11:56
@stlintel stlintel requested a review from vruppert December 11, 2023 11:56
@fysnet
Copy link
Collaborator Author

fysnet commented Dec 11, 2023

This PR shows "All checks have passed", though you comment that there are a lot of compilation errors.
Have these been fixed, hence the "All checks have passed", or do I need to look into the errors?

@stlintel
Copy link
Contributor

This PR shows "All checks have passed", though you comment that there are a lot of compilation errors. Have these been fixed, hence the "All checks have passed", or do I need to look into the errors?

All checks are passed because CI/DI compile for Linux so the code is not enabled.
You should pull from the changes I did in your branch, configure, compile and fix all compilation errors.
Then push the fixes.

@fysnet
Copy link
Collaborator Author

fysnet commented Dec 11, 2023

Please try the new changes to win32_usb.cc. I compile with Visual Studio 2019 and do not get these errors, before the new changes or after.

@fysnet fysnet marked this pull request as ready for review December 11, 2023 22:24
@stlintel
Copy link
Contributor

Most issues fixed, there is 1 warning left which looks suspicious:

/instrument/stubs -O3 -Wall -Wno-format -mno-ms-bitfields -DWIN32 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES win32usb.cc -o win32usb.o
win32usb.cc: In function ‘void do_attributes(HWND, DWORD, int, const char*, const S_ATTRIBUTES*)’:
win32usb.cc:3862:10: warning: ‘char* strncpy(char*, const char*, size_t)’ specified bound 128 equals destination size [-Wstringop-truncation]
3862 | strncpy(a_title, title, COMMON_STR_SIZE);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@fysnet
Copy link
Collaborator Author

fysnet commented Dec 12, 2023

Most issues fixed, there is 1 warning left which looks suspicious:

‘char* strncpy(char*, const char*, size_t)’ specified bound 128 equals destination size [-Wstringop-truncation] 3862

Yep, sorry, that was a leftover from another project where I needed to make sure the string length was valid. It should be just fine here since all strings passed will be within range.
Thank you

@stlintel
Copy link
Contributor

Did anybody tested it ?
I need some kind of confirmation to tell if it is ready to be integrated to master, at least as disabled.

@stlintel
Copy link
Contributor

Rebased to avoid conflict on configure script. Better to regenerate it after checkout.

@stlintel stlintel enabled auto-merge (squash) March 10, 2024 11:05
@stlintel stlintel merged commit 557976b into bochs-emu:master Mar 10, 2024
2 checks passed
@fysnet fysnet deleted the usb_debug branch March 17, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants