public static final String DA_INSTALL_PATH = TIZEN_SDK_INSTALL_PATH + File.separator
+ PathConstants.TOOLS_FOLDER_NAME + File.separator
+ PathConstants.DYNAMIC_ANALYZER_FOLDER_NAME;
- public static final String DA_AUTOTEST_PATH = TIZEN_SDK_DATA_PATH + File.separator
- + "test" + File.separator + PathConstants.DYNAMIC_ANALYZER_FOLDER_NAME;
+ public static final String DA_AUTOTEST_PATH = TIZEN_SDK_DATA_PATH + File.separator + "test"
+ + File.separator + PathConstants.DYNAMIC_ANALYZER_FOLDER_NAME;
public static final String DA_READELF_PATH = DA_INSTALL_PATH + File.separator
+ PathConstants.TARGET_FOLDER_NAME;
public static final String DA_TOOL_FOLDER_PATH = DA_INSTALL_PATH + File.separator
+ PathConstants.TOOL_FOLDER_NAME;
- public static final String DA_DEBUG_DATA_CHANNEL_LOG_FILE = DA_LOG_PATH
- + File.separator + "data.log"; //$NON-NLS-1$
- public static final String DA_DEBUG_CONTROL_CHANNEL_LOG_FILE = DA_LOG_PATH
- + File.separator + "control.log"; //$NON-NLS-1$
+ public static final String DA_DEBUG_DATA_CHANNEL_LOG_FILE = DA_LOG_PATH + File.separator
+ + "data.log"; //$NON-NLS-1$
+ public static final String DA_DEBUG_CONTROL_CHANNEL_LOG_FILE = DA_LOG_PATH + File.separator
+ + "control.log"; //$NON-NLS-1$
public static final String DA_BINARY_AUTO_SAVE_FILE = DA_SAVE_PATH + File.separator
+ "BinarySettings.save";
String platformVersion = platform.replaceAll("[A-Za-z]", "");//$NON-NLS-1$
if (Double.parseDouble(platformVersion) < 2.1) {
- tizenHeaderSouecePath = String.format(tempPath, platformName,
- currentDevie, platformVersion + ".cpp");//$NON-NLS-1$
+ tizenHeaderSouecePath = String.format(tempPath, platformName, currentDevie,
+ platformVersion + ".cpp");//$NON-NLS-1$
} else {
- tizenHeaderSouecePath = String.format(tempPath, platformName,
- currentDevie, platformVersion + ".native");//$NON-NLS-1$
+ tizenHeaderSouecePath = String.format(tempPath, platformName, currentDevie,
+ platformVersion + ".native");//$NON-NLS-1$
}
}
// currently not used
public static String getTargetPath(String platform) {
if (null != platform && !platform.isEmpty()) {
- return TIZEN_SDK_INSTALL_PATH + File.separator
- + PathConstants.PLATFORM_FOLDER_NAME + File.separator + platform
- + File.separator + PathConstants.DYNAMIC_ANALYZER_FOLDER_NAME
- + File.separator;
+ return TIZEN_SDK_INSTALL_PATH + File.separator + PathConstants.PLATFORM_FOLDER_NAME
+ + File.separator + platform + File.separator
+ + PathConstants.DYNAMIC_ANALYZER_FOLDER_NAME + File.separator;
} else {
return DA_INSTALL_PATH + File.separator + PathConstants.TARGET_FOLDER_NAME
+ File.separator;
return aboutFilePath;
}
+ public static boolean checkPlatformPlugin() {
+ String idePluginPath = TIZEN_SDK_INSTALL_PATH + File.separator
+ + PathConstants.IDE_FOLDER_NAME + File.separator
+ + PathConstants.PLUGINS_FOLDER_NAME;
+
+ File dir = new File(idePluginPath);
+ String[] files;
+ if (dir.exists()) {
+ files = dir.list(new FilenameFilter() {
+
+ @Override
+ public boolean accept(File dir, String name) {
+ return name.contains(PathConstants.PLATFORM_IDE_PLUGIN_NAME);
+ }
+ });
+ } else {
+ return false;
+ }
+
+ if (null == files || files.length < 1) {
+ return false;
+ }
+
+ return true;
+ }
+
public static String getWorkbenchPluginPath() {
String aboutFolderPath = TIZEN_SDK_INSTALL_PATH + File.separator
+ PathConstants.TOOLS_FOLDER_NAME + File.separator
public static String getRootstrapsPath(String platform) {
if (platform != null) {
- return TIZEN_SDK_INSTALL_PATH + File.separator
- + PathConstants.PLATFORM_FOLDER_NAME + File.separator + platform
- + File.separator + PathConstants.TIZEN_FOLDER_ROOTSTRAPS;
+ return TIZEN_SDK_INSTALL_PATH + File.separator + PathConstants.PLATFORM_FOLDER_NAME
+ + File.separator + platform + File.separator
+ + PathConstants.TIZEN_FOLDER_ROOTSTRAPS;
} else {
return "";
}
returnstr = DA_TOOL_FOLDER_PATH + File.separator
+ PathConstants.WINDOW_ACTIVATOR_WINDOWS;
} else if (CommonUtil.isMac()) {
- returnstr = DA_TOOL_FOLDER_PATH + File.separator
- + PathConstants.WINDOW_ACTIVATOR_MACOS;
+ returnstr = DA_TOOL_FOLDER_PATH + File.separator + PathConstants.WINDOW_ACTIVATOR_MACOS;
} else if (CommonUtil.isLinux()) {
- returnstr = DA_TOOL_FOLDER_PATH + File.separator
- + PathConstants.WINDOW_ACTIVATOR_LINUX;
+ returnstr = DA_TOOL_FOLDER_PATH + File.separator + PathConstants.WINDOW_ACTIVATOR_LINUX;
} else {
returnstr = null;
}
return returnstr;
}
-
+
public static String getTestLogPath() {
String returnstr = null;
returnstr = getTizenSdkDataPath();
- if (returnstr == null) return returnstr;
- return returnstr + File.separator + PathConstants.DYNAMIC_ANALYZER_FOLDER_NAME
- + File.separator + PathConstants.TEST_FOLDER_NAME;
+ if (returnstr == null)
+ return returnstr;
+ return returnstr + File.separator + PathConstants.DYNAMIC_ANALYZER_FOLDER_NAME
+ + File.separator + PathConstants.TEST_FOLDER_NAME;
}
-
+
public static String getDebugInfoScript() {
String path = null;
-
+
if (CommonUtil.isLinux() || CommonUtil.isMac()) {
- path = DA_TOOL_FOLDER_PATH + File.separator
- + PathConstants.DEBUGINFO_LINUX_MAC;
+ path = DA_TOOL_FOLDER_PATH + File.separator + PathConstants.DEBUGINFO_LINUX_MAC;
} else if (CommonUtil.isWin()) {
- path = DA_TOOL_FOLDER_PATH + File.separator
- + PathConstants.DEBUGINFO_WINDOWS;
+ path = DA_TOOL_FOLDER_PATH + File.separator + PathConstants.DEBUGINFO_WINDOWS;
} else { // should never be here
- Logger.error("Unknown host OS!\n");
+ Logger.error("Unknown host OS!\n");
}
-
+
return path;
}
}
// This class is for global information that can be accessed from anywhere in dynamic analyzer code.
// So this class contains only static methods and variables.
public class Global {
+ private static boolean isPlatformSDK = false;
+
private static DeviceInfo currentDevice = null;
private static PackageInfo currentApplication = null;
private static Project currentProject = null;
private static RunTimeConfiguration currentConfiguration = null;
+ public static boolean isPlatformSDK() {
+ return isPlatformSDK;
+ }
+
+ public static void setPlatformSDK(boolean isPlatformSDK) {
+ Global.isPlatformSDK = isPlatformSDK;
+ }
+
public static DeviceInfo getCurrentDeviceInfo() {
return currentDevice;
}
public static void setCurrentDeviceInfo(DeviceInfo device) {
- currentDevice = device;
+ Global.currentDevice = device;
}
public static PackageInfo getCurrentApplication() {
}
public static void setCurrentApplication(PackageInfo pkgInfo) {
- currentApplication = pkgInfo;
+ Global.currentApplication = pkgInfo;
}
public static RunTimeConfiguration getCurrentConfiguration() {
}
public static void setCurrentConfiguration(RunTimeConfiguration currentConfig) {
- currentConfiguration = currentConfig;
- }
-
- public static void setProject(Project p) {
- currentProject = p;
+ Global.currentConfiguration = currentConfig;
}
public static Project getProject() {
return currentProject;
}
+ public static void setProject(Project p) {
+ Global.currentProject = p;
+ }
+
public static String getFunctionName(int id) {
if (currentProject != null) {
return currentProject.getFunctionName(id);
// add lines for running process
pkginfoLines.add(PackageInfo.PKGTYPE + "[unknown]" + PackageInfo.PKGID + "["
- + AnalyzerConstants.RUNNING_PROCESS + "]");
+ + AnalyzerConstants.RUNNING_PROCESS + "]" + PackageInfo.PRELOAD + "[1]");
pkginfoLines.add(AppInfo.PROPERTY.APPID.name + ":" + AnalyzerConstants.RUNNING_PROCESS);
pkginfoLines.add(AppInfo.PROPERTY.PACKAGE.name + ":" + AnalyzerConstants.RUNNING_PROCESS);
pkginfoLines.add(AppInfo.PROPERTY.LABEL.name + ":"
pkginfoLines.add(AppInfo.PROPERTY.APPTYPE.name + ":" + AppInfo.APPTYPE_RUNNING);
pkginfoLines.add("");
- // add lines for without-executable
+ // add lines for common-executable
pkginfoLines.add(PackageInfo.PKGTYPE + "[unknown]" + PackageInfo.PKGID + "["
- + AnalyzerConstants.COMMON_EXECUTABLE + "]");
+ + AnalyzerConstants.COMMON_EXECUTABLE + "]" + PackageInfo.PRELOAD + "[1]");
pkginfoLines.add(AppInfo.PROPERTY.APPID.name + ":" + AnalyzerConstants.COMMON_EXECUTABLE);
pkginfoLines.add(AppInfo.PROPERTY.PACKAGE.name + ":" + AnalyzerConstants.COMMON_EXECUTABLE);
pkginfoLines.add(AppInfo.PROPERTY.LABEL.name + ":"
// add lines for without-executable
pkginfoLines.add(PackageInfo.PKGTYPE + "[unknown]" + PackageInfo.PKGID + "["
- + AnalyzerConstants.WITHOUT_EXECUTABLE + "]");
+ + AnalyzerConstants.WITHOUT_EXECUTABLE + "]" + PackageInfo.PRELOAD + "[1]");
pkginfoLines.add(AppInfo.PROPERTY.APPID.name + ":" + AnalyzerConstants.WITHOUT_EXECUTABLE);
pkginfoLines
.add(AppInfo.PROPERTY.PACKAGE.name + ":" + AnalyzerConstants.WITHOUT_EXECUTABLE);