-
Notifications
You must be signed in to change notification settings - Fork 0
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
Compilation Fails: Missing Members in 'SourcePawn' namespace #2
Comments
This extension requires more changes to the sourcepawn VM which I never got around to polish up to get them upstreamed. https://github.com/peace-maker/sourcepawn/tree/debug_api_symbols Sorry for wasting your time, I'll look into rebasing the branch on the latest vm so you can test at least. |
I updated the Some bugs in the present part of the debugger API in the VM were discovered too during this, so thank you for poking :D If you really want to test this extension, you'll have to build sourcemod and sourcepawn with the above changes yourself: git clone --branch enable_debugging_api --recurse-submodules https://github.com/peace-maker/sourcemod sourcemod_debugger
cd sourcemod_debugger/sourcepawn
git remote add peace-maker https://github.com/peace-maker/sourcepawn
git fetch peace-maker
git switch debug_api_symbols Then build sourcemod for your game as usual as well as this extension with Then you can start a debugging session like:
I'd love to hear your feedback if you end up trying it. |
Many thanks for the quick response and fix. I'm currently trying to build your fork, and will give you some feedback!. |
I've added builds through CI, check out the latest artifacts from the latest run in the Actions tab. |
Thanks for the Artifacts, I'm currently testing out the debugger with a simple test plugin, here's some feedback. Issues
Demo pluginThis is my way to trigger the BP #pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
int g_nFoo = 0;
int g_aFoo[2] = {0};
public void OnPluginStart()
{
TriggerBp();
}
void TriggerBp()
{
RegServerCmd("bp", Command_Bp, "Trigger the sp-dbg.ext BP");
} public Action Command_Bp(int args)
{
// Testing local variables
int nFoo = 6;
float fFoo = 55.2;
g_nFoo = 6;
// Testing local arrays
int aFoo[2] = {0};
aFoo[1] = 5;
// multidimensional arrays
// Debugger: doesn't print the array variable with "print"
int aFooMult[1][1] = { {0} };
aFooMult[0][0] = 44;
/**
dbg> print aFooMult[0][0]
loc < 0x49b4> aFooMult[0][0] ?
*/
// Suppress compiler warrning "symbol is assigned a value that is never used"
PrintToServer("nFoo = %d, g_nFoo = %d, fFoo = %.1f", nFoo, g_nFoo, fFoo);
return Plugin_Handled;
} Nest loops will prevent the debugger from printing any local variables, Example: int aFoo[1][2] = { {0, ...} };
for(int i = 0; i < sizeof(aFoo); i++)
{
// Debugger: adding `sizeof(aFoo[])` will trigger the disappearance of the stack variables
for(int j = 0; j < sizeof(aFoo[]); j++)
{
aFoo[i][j] = GetRandomInt(0, 10); // fill the each element in the array with random values
PrintToServer("aFoo[%d][%d] = %d", i, j, aFoo[i][j]);
}
} Workflowsm plugins reload temp/sp_dbg_test.smx
alias "d" "sm debug start temp/sp_dbg_test.smx;bp"
d |
Multi-dimensional arrays aren't implemented yet, so that is expected. sp-console-debugger/symbols.cpp Lines 236 to 239 in 4b5af12
Global arrays showing garbage seems to be a problem caused by the array rework for newer plugins. The array dereferencing has to consider the new direct array behavior. I've fixed the crash on |
I assume that you already figured out, based on the issue you've mentioned/created
Do you have any plan to address the issues?, global arrays are used a lot in many plugins, tracking their content would really help out with debugging plugins. Either way appreciate all the work! |
Description
Hi, the compiler will complain about missing members of the
SourcePawn
namespace, here's the full output of the build process using clang-14.build.log
Compiler and OS
Steps to reproduce
Since the last commit time of the extension is dated at around 5 years ago, I've tried to find the relevant commit that modified some of the namespace's members, by searching for the some of missing members in the sourcepawn git tree.
Unfortunately returned no results (which is very confusing), here's what I've tried
The text was updated successfully, but these errors were encountered: