import org.tizen.dynamicanalyzer.common.PathManager;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.communicator.IDECommunicator;
-import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.handlers.ExitHandler;
import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
import org.tizen.dynamicanalyzer.ui.toolbar.configuration.ConfigurationDialogValues;
public boolean preWindowShellClose() {
if (DACommunicator.isRunning()) {
-// DACommunicator.sendStopMessage();
DACommunicator.stopTrace();
}
import org.tizen.dynamicanalyzer.common.HostResult;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
public abstract class BaseCommunicator {
public abstract void closeSock();
- public void setSelectedApp(AppInfo app) {
+ public void setSelectedApp(PackageInfo app) {
}
}
import org.tizen.dynamicanalyzer.common.HostResult;
import org.tizen.dynamicanalyzer.logparser.LogParser;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
import org.tizen.dynamicanalyzer.swap.model.control.EventObject;
import org.tizen.dynamicanalyzer.swap.model.control.ReplayEvent;
import org.tizen.dynamicanalyzer.ui.file.FileChartManager;
+ CommonConstants.CMD_SPLIT
+ ConfigureManager.getInstance().getConfiguration()
+ CommonConstants.CMD_SPLIT
- + DACommunicator.getSelectedApp().getInfo(AppInfo.EXEC_INDEX);
+ + DACommunicator.getSelectedApp().getInfo(PackageInfo.EXEC_INDEX);
String message = AnalyzerConstants.MSG_START
+ CommonConstants.CMD_SPLIT + rearMessage.length()
import org.tizen.dynamicanalyzer.common.HostResult;
import org.tizen.dynamicanalyzer.common.PathManager;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
import org.tizen.dynamicanalyzer.swap.communicator.Communicator30;
import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool;
private static List<String> packageInfoMultiLines = new ArrayList<String>();
- private static AppInfo selectedApp = null;
+ private static PackageInfo selectedApp = null;
private static List<DeviceInfo> devices = null;
private static DeviceInfo currentDevice = null;
// }
}
- public static AppInfo getSelectedApp() {
+ public static PackageInfo getSelectedApp() {
return selectedApp;
}
- public static void setSelectedApp(AppInfo app) {
+ public static void setSelectedApp(PackageInfo app) {
selectedApp = app;
if (null != app && null != communicator) {
communicator.setSelectedApp(app);
return devNameList;
}
- public static List<AppInfo> getAppListFromTarget() {
+ public static List<PackageInfo> getAppListFromTarget() {
if (null == currentDevice) {
return null;
}
- List<AppInfo> appInfoList = currentDevice.getAppInfoList();
- HashMap<String, AppInfo> appInfoHash = currentDevice.getAppInfoHash();
- List<AppInfo> backList = new ArrayList<AppInfo>();
+ List<PackageInfo> appInfoList = currentDevice.getAppInfoList();
+ HashMap<String, PackageInfo> appInfoHash = currentDevice.getAppInfoHash();
+ List<PackageInfo> backList = new ArrayList<PackageInfo>();
backList.addAll(appInfoHash.values());
packageInfoMultiLines.clear();
String line = packageInfoMultiLines.get(i);
if (line.contains("Appid")) {
List<String> lines = new ArrayList<String>();
- for (int ii = 0; ii < AppInfo.PKGINFO_SIZE; ii++) {
+ for (int ii = 0; ii < PackageInfo.PKGINFO_SIZE; ii++) {
lines.add(packageInfoMultiLines.get(ii + i));
}
- AppInfo pkgInfo = makePackageInfo(lines);
+ PackageInfo pkgInfo = makePackageInfo(lines);
if (null != pkgInfo
- && pkgInfo.getInfo(AppInfo.APPTYPE_INDEX).contains(
- AppInfo.APPTYPE_CPP)
- && pkgInfo.getInfo(AppInfo.MULTIPLE_INDEX).equals(
- AppInfo.FLAG_ZERO)
- && pkgInfo.getInfo(AppInfo.NODISPLAY_INDEX).equals(
- AppInfo.FLAG_ZERO)) {
- String pkgId = pkgInfo.getInfo(AppInfo.PACKAGE_INDEX);
- String appId = pkgInfo.getInfo(AppInfo.APPID_INDEX);
+ && pkgInfo.getInfo(PackageInfo.APPTYPE_INDEX).contains(
+ PackageInfo.APPTYPE_CPP)
+ && pkgInfo.getInfo(PackageInfo.MULTIPLE_INDEX).equals(
+ PackageInfo.FLAG_ZERO)
+ && pkgInfo.getInfo(PackageInfo.NODISPLAY_INDEX).equals(
+ PackageInfo.FLAG_ZERO)) {
+ String pkgId = pkgInfo.getInfo(PackageInfo.PACKAGE_INDEX);
+ String appId = pkgInfo.getInfo(PackageInfo.APPID_INDEX);
if (null == appInfoHash.get(pkgId)) {
if (!isUnittest(pkgId) && !isIME(appId)) {
backList.remove(appInfoHash.get(pkgId));
}
}
- i += AppInfo.PKGINFO_SIZE - 1;
+ i += PackageInfo.PKGINFO_SIZE - 1;
}
}
if (!backList.isEmpty()) {
- for (AppInfo pkg : backList) {
+ for (PackageInfo pkg : backList) {
appInfoList.remove(pkg);
appInfoHash.remove(pkg);
}
}
}
- private static AppInfo makePackageInfo(List<String> lines) {
- AppInfo pkgInfo = new AppInfo();
- for (int i = 0; i < AppInfo.PKGINFO_SIZE; i++) {
+ private static PackageInfo makePackageInfo(List<String> lines) {
+ PackageInfo pkgInfo = new PackageInfo();
+ for (int i = 0; i < PackageInfo.PKGINFO_SIZE; i++) {
String line = lines.get(i);
int index = line.indexOf(":");
String data = line.substring(index + 1, line.length()).trim();
return pkgInfo;
}
- public static AppInfo getPkgInfoByName(String appLabel) {
+ public static PackageInfo getPkgInfoByName(String appLabel) {
if (null != currentDevice) {
int size = currentDevice.getAppInfoList().size();
for (int i = 0; i < size; i++) {
- AppInfo pkgInfo = currentDevice.getAppInfoList().get(i);
- if (pkgInfo.getInfo(AppInfo.LABEL_INDEX).equals(appLabel)) {
+ PackageInfo pkgInfo = currentDevice.getAppInfoList().get(i);
+ if (pkgInfo.getInfo(PackageInfo.LABEL_INDEX).equals(appLabel)) {
return pkgInfo;
}
}
return null;
}
- public static AppInfo getPkgInfoByAppPkgId(String pkgid) {
+ public static PackageInfo getPkgInfoByAppPkgId(String pkgid) {
if (null != currentDevice) {
int size = currentDevice.getAppInfoList().size();
for (int i = 0; i < size; i++) {
- AppInfo ai = currentDevice.getAppInfoList().get(i);
- if (ai.getInfo(AppInfo.PACKAGE_INDEX).equals(pkgid)) {
+ PackageInfo ai = currentDevice.getAppInfoList().get(i);
+ if (ai.getInfo(PackageInfo.PACKAGE_INDEX).equals(pkgid)) {
return ai;
}
}
import org.tizen.dynamicanalyzer.common.DASingletonFocusManager;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
import org.tizen.dynamicanalyzer.ui.widgets.DADialog;
DACommunicator.setSelectedDevice(device);
DACommunicator.getAppListFromTarget();
- AppInfo appInfo = DACommunicator.getPkgInfoByAppPkgId(appid);
+ PackageInfo appInfo = DACommunicator.getPkgInfoByAppPkgId(appid);
if (null == appInfo) {
Display.getDefault().syncExec(new Runnable() {
public void run() {
System.out.println("invalid application name :" + appid);
return;
}
- final String appLabel = appInfo.getInfo(AppInfo.LABEL_INDEX);
+ final String appLabel = appInfo.getInfo(PackageInfo.LABEL_INDEX);
System.out.println("IDE recv - deviceName: " + deviceName
+ " appName : " + appLabel);
import java.util.List;
import org.tizen.dynamicanalyzer.communicator.CommunicatorUtils;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
import org.tizen.dynamicanalyzer.swap.model.control.TargetInfo;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.sdblib.IDevice;
private String selectedApplication;
private String targetVersion = null;
- private List<AppInfo> appInfoList = null;
- private HashMap<String, AppInfo> appInfoHash = null;
+ private List<PackageInfo> appInfoList = null;
+ private HashMap<String, PackageInfo> appInfoHash = null;
private List<String> apiList = null;
private TargetInfo targetInfo = null;
public DeviceInfo(IDevice device) {
this.device = device;
- appInfoList = new ArrayList<AppInfo>();
- appInfoHash = new HashMap<String, AppInfo>();
+ appInfoList = new ArrayList<PackageInfo>();
+ appInfoHash = new HashMap<String, PackageInfo>();
targetInfo = new TargetInfo();
apiList = AnalyzerUtil.getApiMap(device);
}
return device;
}
- public List<AppInfo> getAppInfoList() {
+ public List<PackageInfo> getAppInfoList() {
return appInfoList;
}
- public HashMap<String, AppInfo> getAppInfoHash() {
+ public HashMap<String, PackageInfo> getAppInfoHash() {
return appInfoHash;
}
import org.tizen.dynamicanalyzer.swap.model.control.ApplicationInfo;
import org.tizen.dynamicanalyzer.swap.model.control.BinaryInfo;
-public class AppInfo {
+public class PackageInfo {
public static final int APPID_INDEX = 0;
public static final int PACKAGE_INDEX = 1;
private List<String> appInfo = new ArrayList<String>();
- public AppInfo() {
+ public PackageInfo() {
for (int i = 0; i < PKGINFO_SIZE; i++) {
appInfo.add(CommonConstants.EMPTY);
}
}
public void init() {
- appName = DACommunicator.getSelectedApp().getInfo(AppInfo.LABEL_INDEX);
- pkgId = DACommunicator.getSelectedApp().getInfo(AppInfo.PACKAGE_INDEX);
+ appName = DACommunicator.getSelectedApp().getInfo(PackageInfo.LABEL_INDEX);
+ pkgId = DACommunicator.getSelectedApp().getInfo(PackageInfo.PACKAGE_INDEX);
DeviceInfo deviceName = DACommunicator.getSelectedDevice();
if (null != deviceName
&& null != deviceName.getIDevice().getSerialNumber()
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
import org.tizen.dynamicanalyzer.swap.model.probe2.LogData;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
if (userFunctionBin == null || userFunctionBin.isEmpty()) {
if (AnalyzerManager.isOsp()) {
userFunctionBin = new String(DACommunicator.getSelectedApp()
- .getInfo(AppInfo.EXEC_INDEX) + ".exe"); //$NON-NLS-1$
+ .getInfo(PackageInfo.EXEC_INDEX) + ".exe"); //$NON-NLS-1$
} else {
userFunctionBin = new String(DACommunicator.getSelectedApp()
- .getInfo(AppInfo.EXEC_INDEX));
+ .getInfo(PackageInfo.EXEC_INDEX));
}
}
return userFunctionBin;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.common.AnalyzerPaths;
import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands;
import org.tizen.dynamicanalyzer.common.CommonConstants;
import org.tizen.dynamicanalyzer.common.ErrorCode;
import org.tizen.dynamicanalyzer.model.AddrSymbolPair;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
import org.tizen.dynamicanalyzer.swap.logparser.SWAPLogParser;
import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
import org.tizen.dynamicanalyzer.swap.model.control.ApplicationInfo;
import org.tizen.dynamicanalyzer.ui.userinterface.UIDataManager;
import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool;
import org.tizen.dynamicanalyzer.utils.UpdateViewTimer;
-import org.tizen.sdblib.exception.SdbCommandRejectedException;
-import org.tizen.sdblib.exception.TimeoutException;
import org.tizen.sdblib.receiver.MultiLineReceiver;
-import org.tizen.sdblib.service.SyncResult;
public class Communicator30 extends BaseCommunicator {
private boolean isInit = false;
@Override
public HostResult startTrace() {
- // HostResult hr = sendBinaryInfoMessage();
- // if (!hr.isSuccess()) {
- // System.out.println("binary info get failed :" + hr.getMessage());
- // }
- // binary info message send
DACommunicator.setRunning(true);
ApplicationInfo appInfo = new ApplicationInfo();
- AppInfo selectedApp = DACommunicator.getSelectedApp();
- String appType = selectedApp.getInfo(AppInfo.APPTYPE_INDEX);
- if (appType.contains(AppInfo.APPTYPE_CPP)) {
+ PackageInfo selectedApp = DACommunicator.getSelectedApp();
+ String appType = selectedApp.getInfo(PackageInfo.APPTYPE_INDEX);
+ if (appType.contains(PackageInfo.APPTYPE_CPP)) {
appInfo.setAppType(ApplicationInfo.APPTYPE_TIZEN);
} else {
appInfo.setAppType(ApplicationInfo.APPTYPE_COMMON_EXEC);
}
- appInfo.setAppId(selectedApp.getInfo(AppInfo.APPID_INDEX));
- appInfo.setExecPath(selectedApp.getInfo(AppInfo.EXEC_INDEX) + ".exe");
+ appInfo.setAppId(selectedApp.getInfo(PackageInfo.APPID_INDEX));
+ appInfo.setExecPath(selectedApp.getInfo(PackageInfo.EXEC_INDEX)
+ + ".exe");
RunTimeConfiguration rt = new RunTimeConfiguration();
rt.setFeatures(ConfigureManager.getInstance().getConfiguration());
byte[] replayData = AnalyzerManager.getProject().getReplayEvent();
+ UserSpaceInst userSpaceInst = getUserSpaceInst(appInfo);
byte[] rear = ByteUtils.getByte(appInfo.getByteValue(),
- rt.getByteValue(), getUserSpaceInst().getByteValue(),
- replayData);
+ rt.getByteValue(), userSpaceInst.getByteValue(), replayData);
int length = rear.length;
byte[] ret = ByteUtils.getByte(AnalyzerConstants.MSG_START_SWAP,
return result;
}
- private UserSpaceInst getUserSpaceInst() {
+ private UserSpaceInst getUserSpaceInst(ApplicationInfo appInfo) {
UserSpaceInst output = new UserSpaceInst();
if (0 == ConfigureManager.getInstance().getValueInt(
ConfigureLabels.FEATURE_FUNCTION_PROFILING)) {
output.setCount(1); // single processing
ApplicationInst appInst = new ApplicationInst();
appInst.setApplicationType(ApplicationInfo.APPTYPE_TIZEN);
- AppInfo selectedApp = DACommunicator.getSelectedApp();
- appInst.setApplicationId(selectedApp.getInfo(AppInfo.APPID_INDEX));
- appInst.setExecutablePath(selectedApp.getInfo(AppInfo.EXEC_INDEX));
+ PackageInfo selectedApp = DACommunicator.getSelectedApp();
+ appInst.setApplicationId(appInfo.getAppId());
+ appInst.setExecutablePath(appInfo.getExecPath());
List<AddrSymbolPair> symbols = selectedApp.getSymbols();
List<FunctionInst> functionInstList = appInst.getFunctionInstList();
return output;
}
- public HostResult sendBinaryInfoMessage(AppInfo selectedApp) {
+ public HostResult sendBinaryInfoMessage(PackageInfo selectedApp) {
// send config message
byte[] msgBinInfo = ByteUtils
.toBytes(AnalyzerConstants.MSG_BINARY_INFO);
ApplicationInfo appInfo = new ApplicationInfo();
- String appType = selectedApp.getInfo(AppInfo.APPTYPE_INDEX);
- if (appType.contains(AppInfo.APPTYPE_CPP)) {
+ String appType = selectedApp.getInfo(PackageInfo.APPTYPE_INDEX);
+ if (appType.contains(PackageInfo.APPTYPE_CPP)) {
appInfo.setAppType(ApplicationInfo.APPTYPE_TIZEN);
} else {
appInfo.setAppType(ApplicationInfo.APPTYPE_COMMON_EXEC);
}
- appInfo.setAppId(selectedApp.getInfo(AppInfo.APPID_INDEX));
- appInfo.setExecPath(selectedApp.getInfo(AppInfo.EXEC_INDEX));
+ appInfo.setAppId(selectedApp.getInfo(PackageInfo.APPID_INDEX));
+ appInfo.setExecPath(selectedApp.getInfo(PackageInfo.EXEC_INDEX));
int length = appInfo.getByteValue().length;
byte[] msg = ByteUtils.getByte(msgBinInfo, length,
selectedApp.setBinInfo(binInfo);
int binaryType = ByteUtils.toInt(payload, 0);
- String targetPath = selectedApp.getInfo(AppInfo.EXEC_INDEX);
+ String targetPath = selectedApp.getInfo(PackageInfo.EXEC_INDEX);
if (appInfo.getAppType() == ApplicationInfo.APPTYPE_TIZEN) {
targetPath += CommonConstants.EXTENSION_EXEC_FILE;
}
// change binary file path of host
File binFile = new File(binaryPath);
if (!binFile.exists()) {
- binaryPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
- + selectedApp.getExecFileName(appInfo.getAppType());
- try {
- DACommunicator.getSelectedDevice().getIDevice()
- .becomeSuperUser(true);
- } catch (TimeoutException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (SdbCommandRejectedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- SyncResult res = CommunicatorUtils.pull(targetPath, binaryPath);
- if (null != res && res.isOk()) {
- System.out.println("binary copy success!!");//$NON-NLS-1$
- } else {
- System.out.println("Failed to get " + targetPath); //$NON-NLS-1$
- return HostResult.ERR_BIN_INFO_GET_FAIL;
- }
- binInfo.setPath(binaryPath);
- return result;
+ // binaryPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
+ // + selectedApp.getExecFileName(appInfo.getAppType());
+ // try {
+ // DACommunicator.getSelectedDevice().getIDevice()
+ // .becomeSuperUser(true);
+ // } catch (TimeoutException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // } catch (SdbCommandRejectedException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // } catch (IOException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // }
+ //
+ // SyncResult res = CommunicatorUtils.pull(targetPath, binaryPath);
+ // if (null != res && res.isOk()) {
+ // System.out.println("binary copy success!!");//$NON-NLS-1$
+ // } else {
+ // System.out.println("Failed to get " + targetPath); //$NON-NLS-1$
+ // return HostResult.ERR_BIN_INFO_GET_FAIL;
+ // }
+ // binInfo.setPath(binaryPath);
+ // return result;
}
// host has binary then compare binary hash target and local
// FIXME: permission denied problem
if (!targetHashCode.equals(localHashCode)) {
-// String destFilePath = AnalyzerPaths.TEMP_FOLDER_PATH
-// + File.separator
-// + selectedApp.getExecFileName(appInfo.getAppType());
-// try {
-// DACommunicator.getSelectedDevice().getIDevice()
-// .becomeSuperUser(true);
-// } catch (TimeoutException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// } catch (SdbCommandRejectedException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// } catch (IOException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// }
-//
-// SyncResult res = CommunicatorUtils.pull(targetPath, destFilePath);
-// if (null != res && res.isOk()) {
-// System.out.println("binary copy success!!");//$NON-NLS-1$
-// } else {
-// System.out.println("Failed to get " + targetPath + " step 2"); //$NON-NLS-1$
-// return HostResult.ERR_BIN_INFO_GET_FAIL;
-// }
-// String[] splitName = binaryPath.split(CommonConstants.SLASH);
-// binaryPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
-// + new String(splitName[splitName.length - 1]);
-// binInfo.setPath(binaryPath);
+ // String destFilePath = AnalyzerPaths.TEMP_FOLDER_PATH
+ // + File.separator
+ // + selectedApp.getExecFileName(appInfo.getAppType());
+ // try {
+ // DACommunicator.getSelectedDevice().getIDevice()
+ // .becomeSuperUser(true);
+ // } catch (TimeoutException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // } catch (SdbCommandRejectedException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // } catch (IOException e) {
+ // // TODO Auto-generated catch block
+ // e.printStackTrace();
+ // }
+ //
+ // SyncResult res = CommunicatorUtils.pull(targetPath,
+ // destFilePath);
+ // if (null != res && res.isOk()) {
+ // System.out.println("binary copy success!!");//$NON-NLS-1$
+ // } else {
+ // System.out.println("Failed to get " + targetPath + " step 2"); //$NON-NLS-1$
+ // return HostResult.ERR_BIN_INFO_GET_FAIL;
+ // }
+ // String[] splitName = binaryPath.split(CommonConstants.SLASH);
+ // binaryPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
+ // + new String(splitName[splitName.length - 1]);
+ // binInfo.setPath(binaryPath);
}
binInfo.setPath(binaryPath);
byte[] config = ByteUtils.toBytes(AnalyzerConstants.MSG_CONFIG);
RunTimeConfiguration rt = new RunTimeConfiguration();
rt.setFeatures(ConfigureManager.getInstance().getConfiguration());
- int length = rt.getByteValue().length;
- byte[] msg = ByteUtils.concatByteArray(config, length,
- rt.getByteValue());
- // TODO : send swap inst message
+ byte[] rtByte = rt.getByteValue();
+ int length = rtByte.length;
+ byte[] msg = ByteUtils.concatByteArray(config, length, rtByte);
HostResult result = handleControlMessage(
DACommunicator.getSelectedDevice(), msg);
}
@Override
- public void setSelectedApp(AppInfo app) {
+ public void setSelectedApp(PackageInfo app) {
HostResult hr = sendBinaryInfoMessage(app);
if (!hr.isSuccess()) {
System.out.println("binary info get failed :" + hr.getMessage());
// system log
output = new SystemData();
break;
-// case MSG_DATA_RECORD:
-// // replay log
-// output = new ReplayData();
-// break;
case MSG_CONTEXT_SWITCH_ENTRY:
case MSG_CONTEXT_SWITCH_EXIT:
output = new ContextSwitchData();
import org.tizen.dynamicanalyzer.common.SymbolManager;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler;
public class CallStackUnit {
} else {
if (DACommunicator.isDeviceConnected()
&& path.equals(DACommunicator.getSelectedApp().getInfo(
- AppInfo.EXEC_INDEX)) && AnalyzerManager.isOsp()) {
+ PackageInfo.EXEC_INDEX)) && AnalyzerManager.isOsp()) {
path += ".exe"; //$NON-NLS-1$
}
import org.tizen.dynamicanalyzer.model.DeviceInfo;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
-import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.project.PackageInfo;
import org.tizen.dynamicanalyzer.project.Project;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
public static final int SETTING_BUTTON = 6;
String selectedDevice = null;
- AppInfo selectedApp = null;
+ PackageInfo selectedApp = null;
private Shell shell;
private static ToolbarArea coolbarArea;
this.selectedDevice = selectedDevice;
}
- public AppInfo getSelectedApp() {
+ public PackageInfo getSelectedApp() {
return selectedApp;
}
- public void setSelectedApp(AppInfo selectedApp) {
+ public void setSelectedApp(PackageInfo selectedApp) {
this.selectedApp = selectedApp;
}
public void selectionEvent(DACustomCombo combo) {
String appName = combo.getText();
if (null != appName && !appName.isEmpty()) {
- AppInfo selectedApp = DACommunicator
+ PackageInfo selectedApp = DACommunicator
.getPkgInfoByName(appName);
if (null != selectedApp) {
DACommunicator.setSelectedApp(selectedApp);
setSelectedApp(selectedApp);
DACommunicator.getSelectedDevice().setSelectedAppName(
- selectedApp.getInfo(AppInfo.LABEL_INDEX));
+ selectedApp.getInfo(PackageInfo.LABEL_INDEX));
}
if (null != DACommunicator.getSelectedDevice()) {
@Override
public void handleEvent(Event event) {
if (!appCombo.isChildShellOpened()) {
- List<AppInfo> apps = DACommunicator.getAppListFromTarget();
+ List<PackageInfo> apps = DACommunicator.getAppListFromTarget();
if (null == apps || apps.isEmpty()) {
return;
}
appCombo.initCombo();
int size = apps.size();
for (int i = 0; i < size; i++) {
- appCombo.add(apps.get(i).getInfo(AppInfo.LABEL_INDEX));
+ appCombo.add(apps.get(i).getInfo(PackageInfo.LABEL_INDEX));
}
appCombo.setText(selectedApp);
}
appCombo.setEnabled(true);
appCombo.initCombo();
- List<AppInfo> apps = DACommunicator.getAppListFromTarget();
+ List<PackageInfo> apps = DACommunicator.getAppListFromTarget();
int size = 0;
if (null != apps) {
size = apps.size();
}
for (int i = 0; i < size; i++) {
- appCombo.add(apps.get(i).getInfo(AppInfo.LABEL_INDEX));
+ appCombo.add(apps.get(i).getInfo(PackageInfo.LABEL_INDEX));
}
if (size > 0) {
String appName = DACommunicator.getSelectedDevice()
setSelectedApp(apps.get(0));
DACommunicator.setSelectedApp(apps.get(0));
DACommunicator.getSelectedDevice().setSelectedAppName(
- apps.get(0).getInfo(AppInfo.LABEL_INDEX));
+ apps.get(0).getInfo(PackageInfo.LABEL_INDEX));
} else {
- AppInfo appInfo = DACommunicator.getPkgInfoByName(appName);
+ PackageInfo appInfo = DACommunicator.getPkgInfoByName(appName);
if (null != appInfo) {
appCombo.setText(appName);
setSelectedApp(appInfo);
DACommunicator.setSelectedApp(appInfo);
DACommunicator.getSelectedDevice().setSelectedAppName(
- appInfo.getInfo(AppInfo.LABEL_INDEX));
+ appInfo.getInfo(PackageInfo.LABEL_INDEX));
startButton.setButtonEnabled(true);
} else {
appCombo.setText(appName);
appCombo.add(items.get(i));
}
appCombo.select(COMBO_FIRST_INDEX);
- AppInfo appInfo = DACommunicator.getPkgInfoByName(items.get(0));
+ PackageInfo appInfo = DACommunicator.getPkgInfoByName(items.get(0));
if (null != appInfo) {
DACommunicator.setSelectedApp(appInfo);
DACommunicator.getSelectedDevice().setSelectedAppName(
- appInfo.getInfo(AppInfo.LABEL_INDEX));
+ appInfo.getInfo(PackageInfo.LABEL_INDEX));
appCombo.setToolTipText(appCombo.getItem(0));
startButton.setButtonEnabled(true);
} else {
}
public void setAppComboText(final String text) {
- AppInfo appInfo = DACommunicator.getPkgInfoByName(text);
+ PackageInfo appInfo = DACommunicator.getPkgInfoByName(text);
if (null != appInfo) {
DACommunicator.setSelectedApp(appInfo);
DACommunicator.getSelectedDevice().setSelectedAppName(
- appInfo.getInfo(AppInfo.LABEL_INDEX));
+ appInfo.getInfo(PackageInfo.LABEL_INDEX));
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
}
public void setAppComboTextByAppId(String id) {
- AppInfo appInfo = DACommunicator.getPkgInfoByAppPkgId(id);
+ PackageInfo appInfo = DACommunicator.getPkgInfoByAppPkgId(id);
if (null != appInfo) {
DACommunicator.setSelectedApp(appInfo);
DACommunicator.getSelectedDevice().setSelectedAppName(
- appInfo.getInfo(AppInfo.LABEL_INDEX));
- appCombo.setText(appInfo.getInfo(AppInfo.LABEL_INDEX));
+ appInfo.getInfo(PackageInfo.LABEL_INDEX));
+ appCombo.setText(appInfo.getInfo(PackageInfo.LABEL_INDEX));
}
}
return false;
}
- List<AppInfo> apps = DACommunicator.getAppListFromTarget();
+ List<PackageInfo> apps = DACommunicator.getAppListFromTarget();
if (null == apps || apps.isEmpty()) {
return false;
}
appCombo.initCombo();
size = apps.size();
for (int i = 0; i < size; i++) {
- appCombo.add(apps.get(i).getInfo(AppInfo.LABEL_INDEX));
+ appCombo.add(apps.get(i).getInfo(PackageInfo.LABEL_INDEX));
}
index = appCombo.getItems().indexOf(selectedApp);
if (index >= 0) {