]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix autogen bug:[Edk67][Edk35].
authorqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Jul 2006 13:44:18 +0000 (13:44 +0000)
committerqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Jul 2006 13:44:18 +0000 (13:44 +0000)
Add "/FI" to "PP" option in EdkModulePkg-All-Archs.fpd.
Modify BuildMacro.xml changing "S" for IPF assembler.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@746 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/EdkModulePkg-All-Archs.fpd
Tools/Conf/BuildMacro.xml
Tools/Conf/tools_def.template
Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java

index 4bc218c5329380748a2c746387619773cb873a33..a40c309e00a7a4985fc87905f15bd8b5dd041ca7 100644 (file)
         "/nologo", "/W3", "/WX", "/c", "/coff", "/DEFI32", "/Fl${DEST_DIR_OUTPUT}/${FILE_PATH}/${FILE_BASENAME}.lst"
       </Option>
       <Option BuildTargets="DEBUG" ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="ASMLINK"/>
         "/nologo", "/W3", "/WX", "/c", "/coff", "/DEFI32", "/Fl${DEST_DIR_OUTPUT}/${FILE_PATH}/${FILE_BASENAME}.lst"
       </Option>
       <Option BuildTargets="DEBUG" ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="ASMLINK"/>
-      <Option ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="PP"> "/P", "/TC" </Option>
+      <Option ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="PP"> "/P", "/TC", "/FI${DEST_DIR_DEBUG}/AutoGen.h" </Option>
       <Option ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="ASL"> "/nologo" </Option>
       
       <!-- MSFT tool chain options definition : X64 -->
       <Option ToolChainFamily="MSFT" SupArchList="IA32" ToolCode="ASL"> "/nologo" </Option>
       
       <!-- MSFT tool chain options definition : X64 -->
       </Option>
       <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASMLINK"> </Option>
       <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="PP">
       </Option>
       <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASMLINK"> </Option>
       <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="PP">
-        "/P", "/TC"
+        "/P", "/TC", "/FI${DEST_DIR_DEBUG}/AutoGen.h"
       </Option>
       <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASL"> "/nologo" </Option>
       
       </Option>
       <Option ToolChainFamily="MSFT" SupArchList="X64" ToolCode="ASL"> "/nologo" </Option>
       
index 569608245336c58e63c1bcdb5726acb14aa85682..472290893165cb7ff46b44b5bd2c133d6d2ea9da 100644 (file)
@@ -164,7 +164,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
            <if>\r
              <or>\r
                <equals arg1="@{FILEEXT}" arg2="asm" />\r
            <if>\r
              <or>\r
                <equals arg1="@{FILEEXT}" arg2="asm" />\r
-               <equals arg1="@{FILEEXT}" arg2="s" />\r
+               <equals arg1="@{FILEEXT}" arg2="S" />\r
              </or>\r
              <then>\r
                <Build_Assembly FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">\r
              </or>\r
              <then>\r
                <Build_Assembly FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">\r
@@ -173,7 +173,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
           </Build_Assembly>\r
              </then>\r
              <elseif>\r
           </Build_Assembly>\r
              </then>\r
              <elseif>\r
-               <equals arg1="@{FILEEXT}" arg2="S" />\r
+               <equals arg1="@{FILEEXT}" arg2="s" />\r
                <then>\r
                  <Build_IPF_Assembly_Code FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">\r
                    <EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>\r
                <then>\r
                  <Build_IPF_Assembly_Code FILEPATH="@{FILEPATH}" FILENAME="@{FILENAME}" FILEEXT="@{FILEEXT}">\r
                    <EXTRA.INC.1><EXTRA.INC /></EXTRA.INC.1>\r
index 8c80d414e744bf1c53a54dd79bd38f153d46c63d..1ed9446499e53d46538d708184d29f083e871a95 100644 (file)
@@ -41,7 +41,7 @@
 # EBC definitions\r
 *_MSFT_EBC_*_FAMILY = INTEL\r
 *_MSFT_EBC_*_PATH = C:\Program Files\Intel\EBC\Bin\r
 # EBC definitions\r
 *_MSFT_EBC_*_FAMILY = INTEL\r
 *_MSFT_EBC_*_PATH = C:\Program Files\Intel\EBC\Bin\r
-*_MSFT_EBC_*_SPATH = C:\Program Files\Intel\EBC\Lib\EbcLib.lib\r
+*_MSFT_EBC_*_SPATH = C:\Progra~1\Intel\EBC\Lib\EbcLib.lib\r
 *_MSFT_EBC_CC_NAME = iec.exe\r
 *_MSFT_EBC_SLINK_NAME = link.exe\r
 \r
 *_MSFT_EBC_CC_NAME = iec.exe\r
 *_MSFT_EBC_SLINK_NAME = link.exe\r
 \r
index 7de80e6c72ea4d1ed98727b6af70b2ebe7ccc73e..7f9b40e65cd7af1388bf997302e2365e471b542a 100644 (file)
@@ -882,16 +882,11 @@ public class AutoGen {
                                .append("GLOBAL_REMOVE_IF_UNREFERENCED  const UINT8  _gDriverEntryPointCount = ");\r
                        fileBuffer.append(Integer.toString(entryPointCount));\r
                        fileBuffer.append(";\r\n");\r
                                .append("GLOBAL_REMOVE_IF_UNREFERENCED  const UINT8  _gDriverEntryPointCount = ");\r
                        fileBuffer.append(Integer.toString(entryPointCount));\r
                        fileBuffer.append(";\r\n");\r
-                       fileBuffer\r
-                               .append("static BASE_LIBRARY_JUMP_BUFFER  mJumpContext;\r\n");\r
-                               fileBuffer\r
-                                               .append("static EFI_STATUS  mDriverEntryPointStatus = EFI_LOAD_ERROR;\r\n\r\n");\r
-               \r
-                               fileBuffer.append("EFI_STATUS\r\n");\r
+                fileBuffer.append("EFI_STATUS\r\n");\r
                                fileBuffer.append("EFIAPI\r\n");\r
                                fileBuffer.append("ProcessModuleEntryPointList (\r\n");\r
                                fileBuffer.append("EFIAPI\r\n");\r
                                fileBuffer.append("ProcessModuleEntryPointList (\r\n");\r
-                               fileBuffer.append("  EFI_HANDLE        ImageHandle,\r\n");\r
-                               fileBuffer.append("  EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
+                               fileBuffer.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
+                               fileBuffer.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
                                fileBuffer.append("  )\r\n\r\n");\r
                                fileBuffer.append("{\r\n");\r
                                fileBuffer.append("  return EFI_SUCCESS;\r\n");\r
                                fileBuffer.append("  )\r\n\r\n");\r
                                fileBuffer.append("{\r\n");\r
                                fileBuffer.append("  return EFI_SUCCESS;\r\n");\r
@@ -924,8 +919,8 @@ public class AutoGen {
                 fileBuffer.append("EFI_STATUS\r\n");\r
                 fileBuffer.append("EFIAPI\r\n");\r
                 fileBuffer.append("ProcessModuleEntryPointList (\r\n");\r
                 fileBuffer.append("EFI_STATUS\r\n");\r
                 fileBuffer.append("EFIAPI\r\n");\r
                 fileBuffer.append("ProcessModuleEntryPointList (\r\n");\r
-                fileBuffer.append("  EFI_HANDLE        ImageHandle,\r\n");\r
-                fileBuffer.append("  EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
+                fileBuffer.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
+                fileBuffer.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
                 fileBuffer.append("  )\r\n\r\n");\r
                 fileBuffer.append("{\r\n");\r
 \r
                 fileBuffer.append("  )\r\n\r\n");\r
                 fileBuffer.append("{\r\n");\r
 \r
@@ -991,7 +986,7 @@ public class AutoGen {
                        fileBuffer.append("EFI_STATUS\r\n");\r
                        fileBuffer.append("EFIAPI\r\n");\r
                        fileBuffer.append("ProcessModuleUnloadList (\r\n");\r
                        fileBuffer.append("EFI_STATUS\r\n");\r
                        fileBuffer.append("EFIAPI\r\n");\r
                        fileBuffer.append("ProcessModuleUnloadList (\r\n");\r
-                       fileBuffer.append("  EFI_HANDLE  ImageHandle\r\n");\r
+                       fileBuffer.append("  IN EFI_HANDLE  ImageHandle\r\n");\r
                        fileBuffer.append("  )\r\n");\r
                        fileBuffer.append("{\r\n");\r
 \r
                        fileBuffer.append("  )\r\n");\r
                        fileBuffer.append("{\r\n");\r
 \r
@@ -1042,8 +1037,8 @@ public class AutoGen {
                                fileBuffer.append("EFI_STATUS\r\n");\r
                                fileBuffer.append("EFIAPI\r\n");\r
                                fileBuffer.append("ProcessModuleEntryPointList (\r\n");\r
                                fileBuffer.append("EFI_STATUS\r\n");\r
                                fileBuffer.append("EFIAPI\r\n");\r
                                fileBuffer.append("ProcessModuleEntryPointList (\r\n");\r
-                               fileBuffer.append("  EFI_HANDLE        ImageHandle,\r\n");\r
-                               fileBuffer.append("  EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
+                               fileBuffer.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
+                               fileBuffer.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
                                fileBuffer.append("  )\r\n\r\n");\r
                                fileBuffer.append("{\r\n");\r
                                fileBuffer.append("  return EFI_SUCCESS;\r\n");\r
                                fileBuffer.append("  )\r\n\r\n");\r
                                fileBuffer.append("{\r\n");\r
                                fileBuffer.append("  return EFI_SUCCESS;\r\n");\r
@@ -1077,8 +1072,8 @@ public class AutoGen {
                 fileBuffer.append("EFI_STATUS\r\n");\r
                 fileBuffer.append("EFIAPI\r\n");\r
                 fileBuffer.append("ProcessModuleEntryPointList (\r\n");\r
                 fileBuffer.append("EFI_STATUS\r\n");\r
                 fileBuffer.append("EFIAPI\r\n");\r
                 fileBuffer.append("ProcessModuleEntryPointList (\r\n");\r
-                fileBuffer.append("  EFI_HANDLE        ImageHandle,\r\n");\r
-                fileBuffer.append("  EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
+                fileBuffer.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
+                fileBuffer.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
                 fileBuffer.append("  )\r\n\r\n");\r
                 fileBuffer.append("{\r\n");\r
 \r
                 fileBuffer.append("  )\r\n\r\n");\r
                 fileBuffer.append("{\r\n");\r
 \r
@@ -1179,7 +1174,7 @@ public class AutoGen {
                        fileBuffer.append("EFI_STATUS\n");\r
                        fileBuffer.append("EFIAPI\r\n");\r
                        fileBuffer.append("ProcessModuleUnloadList (\r\n");\r
                        fileBuffer.append("EFI_STATUS\n");\r
                        fileBuffer.append("EFIAPI\r\n");\r
                        fileBuffer.append("ProcessModuleUnloadList (\r\n");\r
-                       fileBuffer.append("  EFI_HANDLE  ImageHandle\r\n");\r
+                       fileBuffer.append("  IN EFI_HANDLE  ImageHandle\r\n");\r
                        fileBuffer.append("  )\r\n");\r
                        fileBuffer.append("{\r\n");\r
 \r
                        fileBuffer.append("  )\r\n");\r
                        fileBuffer.append("{\r\n");\r
 \r
@@ -1193,8 +1188,12 @@ public class AutoGen {
                                fileBuffer.append("  EFI_STATUS  Status;\r\n\r\n");\r
                                fileBuffer.append("  Status = EFI_SUCCESS;\r\n\r\n");\r
                                for (int i = 0; i < entryPointList.length; i++) {\r
                                fileBuffer.append("  EFI_STATUS  Status;\r\n\r\n");\r
                                fileBuffer.append("  Status = EFI_SUCCESS;\r\n\r\n");\r
                                for (int i = 0; i < entryPointList.length; i++) {\r
-                                       if (!entryPointList[i].equals("")) {\r
-                                               fileBuffer.append("  if (EFI_ERROR (Status)) {\r\n");\r
+                    if (i == 0) {\r
+                        fileBuffer.append("  Status = ");\r
+                        fileBuffer.append(entryPointList[i]);\r
+                        fileBuffer.append("(ImageHandle);\r\n");\r
+                    }else{\r
+                        fileBuffer.append("  if (EFI_ERROR (Status)) {\r\n");\r
                                                fileBuffer.append("    ");\r
                                                fileBuffer.append(entryPointList[i]);\r
                                                fileBuffer.append("(ImageHandle);\r\n");\r
                                                fileBuffer.append("    ");\r
                                                fileBuffer.append(entryPointList[i]);\r
                                                fileBuffer.append("(ImageHandle);\r\n");\r
@@ -1203,9 +1202,7 @@ public class AutoGen {
                                                fileBuffer.append(entryPointList[i]);\r
                                                fileBuffer.append("(ImageHandle);\r\n");\r
                                                fileBuffer.append("  }\r\n");\r
                                                fileBuffer.append(entryPointList[i]);\r
                                                fileBuffer.append("(ImageHandle);\r\n");\r
                                                fileBuffer.append("  }\r\n");\r
-                                       } else {\r
-                                               break;\r
-                                       }\r
+                    }\r
                                }\r
                                fileBuffer.append("  return Status;\r\n");\r
                        }\r
                                }\r
                                fileBuffer.append("  return Status;\r\n");\r
                        }\r
index 956033993d523ad95abc7978508404b28166efae..5f86217378e1fa021c0c4d09e7cd4b5834bad05b 100644 (file)
@@ -26,41 +26,12 @@ import java.util.regex.Pattern;
 import org.apache.xmlbeans.XmlNormalizedString;\r
 import org.apache.xmlbeans.XmlObject;\r
 import org.apache.xmlbeans.XmlString;\r
 import org.apache.xmlbeans.XmlNormalizedString;\r
 import org.apache.xmlbeans.XmlObject;\r
 import org.apache.xmlbeans.XmlString;\r
-import org.tianocore.BuildOptionsDocument;\r
-import org.tianocore.CNameType;\r
-import org.tianocore.DataIdDocument;\r
-import org.tianocore.ExternsDocument;\r
-import org.tianocore.FileNameConvention;\r
-import org.tianocore.FvAttributeDocument;\r
-import org.tianocore.FvImagesDocument;\r
-import org.tianocore.FvOptionDocument;\r
-import org.tianocore.GuidDeclarationsDocument;\r
-import org.tianocore.GuidsDocument;\r
-import org.tianocore.LibrariesDocument;\r
-import org.tianocore.LibraryClassDeclarationsDocument;\r
-import org.tianocore.LibraryClassDocument;\r
-import org.tianocore.ModuleDefinitionsDocument;\r
-import org.tianocore.ModuleSADocument;\r
-import org.tianocore.ModuleSaBuildOptionsDocument;\r
-import org.tianocore.ModuleTypeDef;\r
-import org.tianocore.MsaFilesDocument;\r
-import org.tianocore.MsaHeaderDocument;\r
-import org.tianocore.OptionDocument;\r
-import org.tianocore.PPIsDocument;\r
-import org.tianocore.PackageDependenciesDocument;\r
-import org.tianocore.PackageHeadersDocument;\r
-import org.tianocore.PcdCodedDocument;\r
-import org.tianocore.PlatformDefinitionsDocument;\r
-import org.tianocore.PpiDeclarationsDocument;\r
-import org.tianocore.ProtocolDeclarationsDocument;\r
-import org.tianocore.Sentence;\r
-import org.tianocore.SpdHeaderDocument;\r
-import org.tianocore.SupportedArchitectures;\r
+import org.tianocore.*;\r
 import org.tianocore.FilenameDocument.Filename;\r
 import org.tianocore.MsaHeaderDocument.MsaHeader;\r
 import org.tianocore.ProtocolsDocument.Protocols.Protocol;\r
 import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;\r
 import org.tianocore.FilenameDocument.Filename;\r
 import org.tianocore.MsaHeaderDocument.MsaHeader;\r
 import org.tianocore.ProtocolsDocument.Protocols.Protocol;\r
 import org.tianocore.ProtocolsDocument.Protocols.ProtocolNotify;\r
-import org.tianocore.PlatformHeaderDocument;\r
+import org.tianocore.SupportedArchitectures.Enum;\r
 import org.tianocore.build.id.FpdModuleIdentification;\r
 import org.tianocore.build.id.ModuleIdentification;\r
 import org.tianocore.build.id.PackageIdentification;\r
 import org.tianocore.build.id.FpdModuleIdentification;\r
 import org.tianocore.build.id.ModuleIdentification;\r
 import org.tianocore.build.id.PackageIdentification;\r
@@ -269,12 +240,7 @@ public class SurfaceAreaQuery {
         String[] xPath;\r
         Object[] returns;\r
 \r
         String[] xPath;\r
         Object[] returns;\r
 \r
-        if (arch == null || arch.equals("")) {\r
-            xPath = new String[] { "/Filename" };\r
-        } else {\r
-            xPath = new String[] { "/Filename[not(@SupArchList) or @SupArchList='"\r
-                    + arch + "']" };\r
-        }\r
+        xPath = new String[] { "/Filename" };\r
 \r
         returns = get("SourceFiles", xPath);\r
 \r
 \r
         returns = get("SourceFiles", xPath);\r
 \r
@@ -283,10 +249,18 @@ public class SurfaceAreaQuery {
         }\r
 \r
         Filename[] sourceFileNames = (Filename[]) returns;\r
         }\r
 \r
         Filename[] sourceFileNames = (Filename[]) returns;\r
-        String[][] outputString = new String[sourceFileNames.length][2];\r
+        List<String[]> outputList = new ArrayList<String[]>();\r
         for (int i = 0; i < sourceFileNames.length; i++) {\r
         for (int i = 0; i < sourceFileNames.length; i++) {\r
-            outputString[i][0] = sourceFileNames[i].getToolCode();\r
-            outputString[i][1] = sourceFileNames[i].getStringValue();\r
+            List<String> archList = sourceFileNames[i].getSupArchList();\r
+            if (arch == null || arch.equalsIgnoreCase("") || archList == null || archList.contains(arch)) {\r
+                outputList.add(new String[] {sourceFileNames[i].getToolCode(),sourceFileNames[i].getStringValue()});\r
+            }\r
+        }\r
+           \r
+        String[][] outputString = new String[outputList.size()][2];\r
+        for (int index = 0; index < outputList.size(); index++) {\r
+            outputString[index][0] = outputList.get(index)[0];\r
+            outputString[index][1] = outputList.get(index)[1];\r
         }\r
         return outputString;\r
     }\r
         }\r
         return outputString;\r
     }\r
@@ -558,13 +532,9 @@ public class SurfaceAreaQuery {
         String packageGuid = null;\r
         String packageVersion = null;\r
 \r
         String packageGuid = null;\r
         String packageVersion = null;\r
 \r
-        if (arch == null || arch.equals("")) {\r
-            xPath = new String[] { "/Package" };\r
-        } else {\r
-            xPath = new String[] { "/Package[not(@SupArchList) or @SupArchList='"\r
-                    + arch + "']" };\r
-        }\r
-\r
+        \r
+        xPath = new String[] { "/Package" };\r
+        \r
         Object[] returns = get("PackageDependencies", xPath);\r
         if (returns == null) {\r
             return new PackageIdentification[0];\r
         Object[] returns = get("PackageDependencies", xPath);\r
         if (returns == null) {\r
             return new PackageIdentification[0];\r
@@ -572,10 +542,13 @@ public class SurfaceAreaQuery {
         PackageIdentification[] packageIdList = new PackageIdentification[returns.length];\r
         for (int i = 0; i < returns.length; i++) {\r
             PackageDependenciesDocument.PackageDependencies.Package item = (PackageDependenciesDocument.PackageDependencies.Package) returns[i];\r
         PackageIdentification[] packageIdList = new PackageIdentification[returns.length];\r
         for (int i = 0; i < returns.length; i++) {\r
             PackageDependenciesDocument.PackageDependencies.Package item = (PackageDependenciesDocument.PackageDependencies.Package) returns[i];\r
-            packageGuid = item.getPackageGuid();\r
-            packageVersion = item.getPackageVersion();\r
-            packageIdList[i] = (new PackageIdentification(null, packageGuid,\r
+            List<String> archList = item.getSupArchList();\r
+            if (arch == null || archList == null || archList.contains(arch)) {\r
+                packageGuid = item.getPackageGuid();\r
+                packageVersion = item.getPackageVersion();\r
+                packageIdList[i] = (new PackageIdentification(null, packageGuid,\r
                     packageVersion));\r
                     packageVersion));\r
+            }\r
         }\r
         return packageIdList;\r
     }\r
         }\r
         return packageIdList;\r
     }\r
@@ -654,7 +627,7 @@ public class SurfaceAreaQuery {
         if (arch == null || arch.equals("")) {\r
             return new String[0];\r
         } else {\r
         if (arch == null || arch.equals("")) {\r
             return new String[0];\r
         } else {\r
-            archXpath = "/Protocol[@SupArchList='" + arch + "']";\r
+            archXpath = "/Protocol";\r
             if (usage != null && !usage.equals("")) {\r
                 usageXpath = "/Protocol[@Usage='" + usage + "']";\r
                 xPath = new String[] { usageXpath, archXpath };\r
             if (usage != null && !usage.equals("")) {\r
                 usageXpath = "/Protocol[@Usage='" + usage + "']";\r
                 xPath = new String[] { usageXpath, archXpath };\r
@@ -699,15 +672,20 @@ public class SurfaceAreaQuery {
         if (returns == null) {\r
             return new String[0];\r
         }\r
         if (returns == null) {\r
             return new String[0];\r
         }\r
-        Protocol[] protocolList = (Protocol[]) returns;\r
+        Protocol[] returnlList = (Protocol[]) returns;\r
 \r
 \r
-        String[] protocolArray = new String[returns.length];\r
+        List<String> protocolList = new ArrayList<String>();\r
+        \r
         for (int i = 0; i < returns.length; i++) {\r
         for (int i = 0; i < returns.length; i++) {\r
-            List<String> archList = protocolList[i].getSupArchList();\r
+            List<String> archList = returnlList[i].getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
             if (archList == null || archList.contains(arch)){\r
-                protocolArray[i] = protocolList[i].getProtocolCName(); \r
+                protocolList.add(returnlList[i].getProtocolCName());\r
             }\r
         }\r
             }\r
         }\r
+        String[] protocolArray = new String[protocolList.size()];\r
+        for (int i = 0; i < protocolList.size(); i++) {\r
+            protocolArray[i] = protocolList.get(i);\r
+        }\r
         return protocolArray;\r
     }\r
 \r
         return protocolArray;\r
     }\r
 \r
@@ -734,16 +712,20 @@ public class SurfaceAreaQuery {
             return new String[0];\r
         }\r
 \r
             return new String[0];\r
         }\r
 \r
-        String[] protocolNotifyList = new String[returns.length];\r
+        List<String> protocolNotifyList = new ArrayList<String>();\r
+        \r
         for (int i = 0; i < returns.length; i++) {\r
             List<String> archList = ((ProtocolNotify) returns[i]).getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
         for (int i = 0; i < returns.length; i++) {\r
             List<String> archList = ((ProtocolNotify) returns[i]).getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
-                protocolNotifyList[i] = ((ProtocolNotify) returns[i]).getProtocolNotifyCName();\r
+                protocolNotifyList.add(((ProtocolNotify) returns[i]).getProtocolNotifyCName());\r
             }\r
             \r
         }\r
             }\r
             \r
         }\r
-\r
-        return protocolNotifyList;\r
+        String[] protocolNotifyArray = new String[protocolNotifyList.size()];\r
+        for (int i = 0; i < protocolNotifyList.size(); i++) {\r
+            protocolNotifyArray[i] = protocolNotifyList.get(i);\r
+        }\r
+        return protocolNotifyArray;\r
     }\r
 \r
     /**\r
     }\r
 \r
     /**\r
@@ -764,7 +746,7 @@ public class SurfaceAreaQuery {
         if (arch == null || arch.equals("")) {\r
             return new String[0];\r
         } else {\r
         if (arch == null || arch.equals("")) {\r
             return new String[0];\r
         } else {\r
-            archXpath = "/ProtocolNotify[@SupArchList='" + arch + "']";\r
+            archXpath = "/ProtocolNotify";\r
             if (usage != null && !usage.equals("")) {\r
                 usageXpath = "/ProtocolNotify[@Usage='" + arch + "']";\r
                 xPath = new String[] { archXpath, usageXpath };\r
             if (usage != null && !usage.equals("")) {\r
                 usageXpath = "/ProtocolNotify[@Usage='" + arch + "']";\r
                 xPath = new String[] { archXpath, usageXpath };\r
@@ -851,16 +833,21 @@ public class SurfaceAreaQuery {
             return new String[0];\r
         }\r
 \r
             return new String[0];\r
         }\r
 \r
-        String[] ppiNotifyList = new String[returns.length];\r
+        \r
+        List<String> ppiNotifyList = new ArrayList<String>();\r
         for (int i = 0; i < returns.length; i++) {\r
             List<String> archList = ((PPIsDocument.PPIs.PpiNotify) returns[i]).getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
         for (int i = 0; i < returns.length; i++) {\r
             List<String> archList = ((PPIsDocument.PPIs.PpiNotify) returns[i]).getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
-                ppiNotifyList[i] = ((PPIsDocument.PPIs.PpiNotify) returns[i]).getPpiNotifyCName();    \r
+                ppiNotifyList.add(((PPIsDocument.PPIs.PpiNotify) returns[i]).getPpiNotifyCName()); \r
             }\r
             \r
         }\r
             }\r
             \r
         }\r
+        String[] ppiNotifyArray = new String[ppiNotifyList.size()];\r
+        for (int i = 0; i < ppiNotifyList.size(); i++) {\r
+            ppiNotifyArray[i] = ppiNotifyList.get(i);\r
+        }\r
 \r
 \r
-        return ppiNotifyList;\r
+        return ppiNotifyArray;\r
     }\r
 \r
     /**\r
     }\r
 \r
     /**\r
@@ -927,15 +914,19 @@ public class SurfaceAreaQuery {
             return new String[0];\r
         }\r
 \r
             return new String[0];\r
         }\r
 \r
-        String[] ppiList = new String[returns.length];\r
+        List<String> ppiList = new ArrayList<String>();\r
         for (int i = 0; i < returns.length; i++) {\r
             List<String> archList = ((PPIsDocument.PPIs.Ppi) returns[i]).getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
         for (int i = 0; i < returns.length; i++) {\r
             List<String> archList = ((PPIsDocument.PPIs.Ppi) returns[i]).getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
-                ppiList[i] = ((PPIsDocument.PPIs.Ppi) returns[i]).getPpiCName();    \r
+                ppiList.add(((PPIsDocument.PPIs.Ppi) returns[i]).getPpiCName());    \r
             }\r
             \r
         }\r
             }\r
             \r
         }\r
-        return ppiList;\r
+        String[] ppiArray = new String[ppiList.size()];\r
+        for (int i = 0; i < ppiList.size(); i++) {\r
+            ppiArray[i] = ppiList.get(i);\r
+        }\r
+        return ppiArray;\r
     }\r
 \r
     /**\r
     }\r
 \r
     /**\r
@@ -1001,15 +992,20 @@ public class SurfaceAreaQuery {
         if (returns == null) {\r
             return new String[0];\r
         }\r
         if (returns == null) {\r
             return new String[0];\r
         }\r
-        String[] guidList = new String[returns.length];\r
+\r
+        List<String> guidList = new ArrayList<String>();\r
         for (int i = 0; i < returns.length; i++) {\r
             List<String> archList = ((GuidsDocument.Guids.GuidCNames) returns[i]).getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
         for (int i = 0; i < returns.length; i++) {\r
             List<String> archList = ((GuidsDocument.Guids.GuidCNames) returns[i]).getSupArchList();\r
             if (archList == null || archList.contains(arch)){\r
-                guidList[i] = ((GuidsDocument.Guids.GuidCNames) returns[i]).getGuidCName();    \r
+                guidList.add(((GuidsDocument.Guids.GuidCNames) returns[i]).getGuidCName());    \r
             }\r
             \r
         }\r
             }\r
             \r
         }\r
-        return guidList;\r
+        String[] guidArray = new String[guidList.size()];\r
+        for (int i = 0; i < guidList.size(); i++) {\r
+            guidArray[i] = guidList.get(i);\r
+        }\r
+        return guidArray;\r
 \r
     }\r
 \r
 \r
     }\r
 \r
@@ -1074,6 +1070,11 @@ public class SurfaceAreaQuery {
         if (arch == null || arch.equalsIgnoreCase("")) {\r
             xPath = new String[] { "/Instance" };\r
         } else {\r
         if (arch == null || arch.equalsIgnoreCase("")) {\r
             xPath = new String[] { "/Instance" };\r
         } else {\r
+            //\r
+            // Since Schema don't have SupArchList now, so the follow Xpath is \r
+            // equal to "/Instance" and [not(@SupArchList) or @SupArchList= arch]\r
+            // don't have effect.\r
+            //\r
             xPath = new String[] { "/Instance[not(@SupArchList) or @SupArchList='"\r
                     + arch + "']" };\r
         }\r
             xPath = new String[] { "/Instance[not(@SupArchList) or @SupArchList='"\r
                     + arch + "']" };\r
         }\r