diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-23 15:25:32 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-23 15:25:32 +0000 |
commit | 685f8c760077cb2fb11b74c5758a6d54aebf539f (patch) | |
tree | ec61d54db54fb07c11ceed136ea89a38876bf5d5 /EmbeddedPkg/Library/GdbDebugAgent/Arm | |
parent | 7c137cae5a87548c824966e3caad22928a9aea27 (diff) | |
download | edk2-platforms-685f8c760077cb2fb11b74c5758a6d54aebf539f.tar.xz |
Fix more InitializeDebugAgent API change bugs. GDB stub was not turned on in example platforms.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10687 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Library/GdbDebugAgent/Arm')
-rwxr-xr-x | EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c b/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c index c5f59323db..d3c050499a 100755 --- a/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c +++ b/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c @@ -15,7 +15,6 @@ #include <GdbDebugAgent.h>
-#include <Library/CacheMaintenanceLib.h>
#include <Library/PrintLib.h>
#include <Library/ArmLib.h>
@@ -597,17 +596,31 @@ GdbFPutString ( /**
Initialize debug agent.
- This function is used to set up debug enviroment. It may enable interrupts.
+ This function is used to set up debug environment to support source level debugging.
+ If certain Debug Agent Library instance has to save some private data in the stack,
+ this function must work on the mode that doesn't return to the caller, then
+ the caller needs to wrap up all rest of logic after InitializeDebugAgent() into one
+ function and pass it into InitializeDebugAgent(). InitializeDebugAgent() is
+ responsible to invoke the passing-in function at the end of InitializeDebugAgent().
- @param[in] InitFlag Init flag is used to decide initialize process.
- @param[in] Context Context needed according to InitFlag, it was optional.
+ If the parameter Function is not NULL, Debug Agent Libary instance will invoke it by
+ passing in the Context to be its parameter.
+
+ If Function() is NULL, Debug Agent Library instance will return after setup debug
+ environment.
+
+ @param[in] InitFlag Init flag is used to decide the initialize process.
+ @param[in] Context Context needed according to InitFlag; it was optional.
+ @param[in] Function Continue function called by debug agent library; it was
+ optional.
**/
VOID
EFIAPI
InitializeDebugAgent (
IN UINT32 InitFlag,
- IN VOID *Context OPTIONAL
+ IN VOID *Context, OPTIONAL
+ IN DEBUG_AGENT_CONTINUE Function OPTIONAL
)
{ UINTN Offset;
@@ -653,6 +666,10 @@ InitializeDebugAgent ( ArmEnableInterrupts ();
}
+ if (Function != NULL) {
+ Function (Context);
+ }
+
return;
}
|