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

DbgPrompt functions as expected #544

Open
GXTX opened this issue Feb 18, 2022 · 2 comments
Open

DbgPrompt functions as expected #544

GXTX opened this issue Feb 18, 2022 · 2 comments

Comments

@GXTX
Copy link
Contributor

GXTX commented Feb 18, 2022

char resp[255];
char *prp = "hello world: ";

DbgPrompt(prp, &resp, 255);
DbgPrint("%s\n", resp);

funcs

Not sure why this function has a description as if it were broken. Please update. The prototype is also wrong.

XBAPI ULONG NTAPI DbgPrompt

Btw the response length isn't taken into account, you can overflow easily (or could be from my types, idk)

@JayFoxRox
Copy link
Member

Not sure why this function has a description as if it were broken.

I assume this function crashes because the export is only present in debug kernels, so if the user ran it on another kernel they likely called into NULL.
cxbe could probably warn about used symbols which aren't present in all kernels.

The comment also says "XBox" which is a spelling we don't use either (as we always use "Xbox"), so the comment is likely from a bad source.

Btw the response length isn't taken into account, you can overflow easily (or could be from my types, idk)

Could be a bug / lack of features in the kernel. The API is likely from Windows and the Xbox does not necessarily implement all features.
Should probably be double-checked and documented.

@thrimbor
Copy link
Member

The comment was added by me because that was what seemed to happen when I had the opportunity to try my code on a debug kit (back when this was written, which predates my involvement in the development of nxdk).

Unfortunately, this issue (again) lacks almost all useful/required info (what software is that? How is it attached, xbdm, serial? What is allegedly wrong about the function prototype?) so I don't see myself taking away time from other stuff to invest it into reproducing this in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants