| 1296 | } |
| 1297 | |
| 1298 | BF_EXPORT StringView BF_CALLTYPE Debugger_Evaluate(const char* expr, int callStackIdx, int cursorPos, int32 language, uint16 expressionFlags) |
| 1299 | { |
| 1300 | auto debugger = gDebugger; |
| 1301 | |
| 1302 | if (debugger == NULL) |
| 1303 | debugger = gDebugManager->mDebugger64; |
| 1304 | |
| 1305 | String& outString = *gTLStrReturn.Get(); |
| 1306 | outString.clear(); |
| 1307 | outString = debugger->Evaluate(expr, callStackIdx, cursorPos, language, (DwEvalExpressionFlags)expressionFlags); |
| 1308 | #ifdef BF_WANTS_LOG_DBG |
| 1309 | { |
| 1310 | int crPos = (int)outString.IndexOf('\n'); |
| 1311 | if (crPos != -1) |
| 1312 | BfLogDbg("Debugger_Evaluate Result=%s\n", outString.Substring(0, crPos).c_str()); |
| 1313 | else |
| 1314 | BfLogDbg("Debugger_Evaluate Result=%s\n", outString.c_str()); |
| 1315 | } |
| 1316 | #endif |
| 1317 | return outString; |
| 1318 | } |
| 1319 | |
| 1320 | BF_EXPORT const char* BF_CALLTYPE Debugger_EvaluateToAddress(const char* expr, int callStackIdx, int cursorPos) |
| 1321 | { |