From 9ad824fe7a3ee90e4fd0abbbe9331ebabb1a18bf Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 1 Jan 2007 03:40:17 +0000 Subject: [PATCH] final API touches --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40250 --- sourcepawn/include/sp_vm_api.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sourcepawn/include/sp_vm_api.h b/sourcepawn/include/sp_vm_api.h index a178a049..93fedf57 100644 --- a/sourcepawn/include/sp_vm_api.h +++ b/sourcepawn/include/sp_vm_api.h @@ -349,6 +349,7 @@ namespace SourcePawn */ class IContextTrace { + public: /** * @brief Returns the integer error code. * @@ -391,6 +392,15 @@ namespace SourcePawn * @brief Resets the trace to its original position (the call on the top of the stack). */ virtual void ResetTrace() =0; + + /** + * @brief Retrieves the name of the last native called. + * Returns NULL if there was no native that caused the error. + * + * @param index Opterional pointer to store index. + * @return Native name, or NULL if none. + */ + virtual const char *GetLastNative(uint32_t *index) =0; }; @@ -484,7 +494,10 @@ namespace SourcePawn virtual void ExecFree(void *address) =0; /** - * @brief Sets the debug listener. + * @brief Sets the debug listener. This should only be called once. + * If called successively (using manual chaining), only the last function should + * attempt to call back into the same plugin. Otherwise, globally cached states + * can be accidentally overwritten. * * @param listener Pointer to an IDebugListener. * @return Old IDebugListener, or NULL if none.