Skip to contentSkip to conversation

systemtap: add possibility for user to point to his build folder

PATCH In review Adrian Dudau 2 participants 3 messages Apr 29, 2013 – May 23, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemtap: add possibility for user to point to his build folder

[Yocto #4223]

---
 .../src/org/yocto/sdk/remotetools/Messages.java    |    1 +
 .../org/yocto/sdk/remotetools/ShellSession.java    |    6 +++--
 .../sdk/remotetools/actions/SystemtapHandler.java  |    3 ++-
 .../sdk/remotetools/actions/SystemtapModel.java    |    6 +++--
 .../actions/SystemtapSettingDialog.java            |   28 ++++++++++++++++++++
 .../org/yocto/sdk/remotetools/messages.properties  |    1 +
 6 files changed, 40 insertions(+), 5 deletions(-)
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Messages.java +1 -0
index 66ba62b..cbf2b05 100644
@@ -40,6 +40,7 @@ public class Messages extends NLS {
 	public static String TerminalViewer_text;
 	//public static String Systemtap_KO_Text;
 	public static String Metadata_Location;
+	public static String Builddir_Location;
 	public static String User_ID;
 	public static String Remote_Host;
 	public static String Systemtap_Script;
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ShellSession.java +4 -2
index 5602798..cbc8e55 100644
@@ -66,12 +66,14 @@ public class ShellSession {
 	private String shellPath = null;
 	private final String initCmd;
 	private final File root;
+	private final File builddir;
 	
 	private OutputStreamWriter out;
 	
 
-	public ShellSession(int shellType, File root, String initCmd, OutputStream out) throws IOException {
+	public ShellSession(int shellType, File root, File builddir, String initCmd, OutputStream out) throws IOException {
 		this.root = root;
+		this.builddir = builddir;
 		this.initCmd  = initCmd;
 		if (out == null) {
 			this.out = new OutputStreamWriter(null);
@@ -95,7 +97,7 @@ public class ShellSession {
 		}
 		
 		if (initCmd != null) {
-			execute("source " + initCmd);
+			execute("source " + initCmd + " " + builddir.getAbsolutePath());
 		}
 	}
 
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapHandler.java +2 -1
index 87094ee..dc11e39 100644
@@ -35,6 +35,7 @@ public class SystemtapHandler extends AbstractHandler {
 		
 		setting.open();
 		String metadata_location = ((SystemtapSettingDialog)setting).getMetadataLocation();
+		String builddir_location = ((SystemtapSettingDialog)setting).getBuilddirLocation();
 		String remote_host = ((SystemtapSettingDialog)setting).getRemoteHost();
 		String user_id = ((SystemtapSettingDialog)setting).getUserID();
 		String systemtap_script = ((SystemtapSettingDialog)setting).getSystemtapScript();
@@ -42,7 +43,7 @@ public class SystemtapHandler extends AbstractHandler {
 
 		if(setting.open() == BaseSettingDialog.OK) {
 			IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
-			SystemtapModel op = new SystemtapModel(metadata_location,remote_host, user_id, systemtap_script,
+			SystemtapModel op = new SystemtapModel(metadata_location, builddir_location, remote_host, user_id, systemtap_script,
 					systemtap_args,window.getShell().getDisplay());
 			try {
 				progressService.busyCursorWhile(op);
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapModel.java +4 -2
index 0d22d97..c834097 100644
@@ -26,6 +26,7 @@ public class SystemtapModel extends BaseModel {
 	protected static final String SYSTEMTAP_CONSOLE = "Systemtap Console";
 	protected MessageConsole sessionConsole;
 	private String metadata_location;
+	private String builddir_location;
 	private String remote_host;
 	private String user_id;
 	private String systemtap_script;
@@ -33,9 +34,10 @@ public class SystemtapModel extends BaseModel {
 	
 	Display display;
 	
-	public SystemtapModel(String metadata_location, String remote_host, String user_id, String systemtap_script, String systemtap_args, Display display) {
+	public SystemtapModel(String metadata_location, String builddir_location, String remote_host, String user_id, String systemtap_script, String systemtap_args, Display display) {
 		super(null);
 		this.metadata_location=metadata_location;
+		this.builddir_location=builddir_location;
 		this.remote_host=remote_host;
 		this.user_id=user_id;
 		this.systemtap_script=systemtap_script;
@@ -68,7 +70,7 @@ public class SystemtapModel extends BaseModel {
 	throws InvocationTargetException, InterruptedException {
 		try {
 			ShellSession shell = new ShellSession(ShellSession.SHELL_TYPE_BASH, 
-												new File(this.metadata_location),
+												new File(this.metadata_location), new File(this.builddir_location),
 												DEFAULT_INIT_SCRIPT, sessionConsole.newOutputStream());
 			boolean acceptedKey = shell.ensureKnownHostKey(user_id, remote_host);
 			if (acceptedKey) {
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapSettingDialog.java +28 -0
index 8b4703c..2104ee8 100644
@@ -37,18 +37,21 @@ public class SystemtapSettingDialog extends Dialog {
 	static protected String TITLE="Systemtap Crosstap";
 	protected String title;
 	protected String metadata_location;
+	protected String builddir_location;
 	protected String systemtap_script;
 	protected String user_id;
 	protected String remote_host;
 	protected String systemtap_args;
 	protected boolean okPressed;
 	protected Button metadataLocationBtn;
+	protected Button builddirLocationBtn;
 	protected Button systemtapScriptBtn;
 	protected Text userIDText;
 	protected Text remoteHostText;
 	protected Text systemtapArgsText;
 	protected Text systemtapScriptText;
 	protected Text metadataLocationText;
+	protected Text builddirLocationText;
 	
 	protected SystemtapSettingDialog(Shell parentShell, String title) {
 		super(parentShell);
@@ -75,6 +78,10 @@ public class SystemtapSettingDialog extends Dialog {
 		return metadata_location;
 	}
 	
+	public String getBuilddirLocation() {
+		return builddir_location;
+	}
+
 	public String getRemoteHost() {
 		return remote_host;
 	}
@@ -119,6 +126,14 @@ public class SystemtapSettingDialog extends Dialog {
 		metadataLocationBtn = addDirSelectButton(textContainer, metadataLocationText);
 		
 		label = new Label(projComp, SWT.NONE);
+		label.setText(Messages.Builddir_Location);
+		textContainer = new Composite(projComp, SWT.NONE);
+		textContainer.setLayout(new GridLayout(2, false));
+		textContainer.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		builddirLocationText = (Text)addTextControl(textContainer, builddir_location);
+		builddirLocationBtn = addDirSelectButton(textContainer, builddirLocationText);
+
+		label = new Label(projComp, SWT.NONE);
 		label.setText(Messages.User_ID);
 		userIDText = new Text(projComp, SWT.SINGLE | SWT.BORDER);
 		
@@ -219,6 +234,19 @@ public class SystemtapSettingDialog extends Dialog {
 			CommonHelper.showErrorDialog("SystemTap Error", null, "The specified metadata location is not a directory!");
 			return;
 		}
+		builddir_location = builddirLocationText.getText();
+		if ( (builddir_location == null) || builddir_location.isEmpty()) {
+			CommonHelper.showErrorDialog("SystemTap Error", null, "Please specify your builddir location!");
+			return;
+		}
+		File builddir_dir = new File(builddir_location);
+		if (!builddir_dir.exists()) {
+			CommonHelper.showErrorDialog("SystemTap Error", null, "The specified builddir location does not exist!");
+		}
+		if (!metadata_dir.isDirectory()) {
+			CommonHelper.showErrorDialog("SystemTap Error", null, "The specified builddir location is not a directory!");
+			return;
+		}
 		user_id = userIDText.getText();
 		if ( (user_id == null) || user_id.isEmpty()) {
 			CommonHelper.showErrorDialog("SystemTap Error", null, "Please specify remote user id!");
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/messages.properties +1 -0
index 7bbf987..2d6d8af 100644
@@ -35,6 +35,7 @@ Powertop_ShowPid_Text=show pids in wakeups list
 TerminalViewer_text=This view is dedicated to Yocto Remote tools. Please use the "Yocto Remote Tools" menu to open the view.
 //Systemtap_KO_Text=Kernel Module:
 Metadata_Location=Metadata Location:
+Builddir_Location=Build dir Location:
 User_ID=User ID:
 Remote_Host=Remote Host:
 Systemtap_Script=Systemtap Script:
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 184 lines · Adrian Dudau

[Yocto #4223]

---
 .../src/org/yocto/sdk/remotetools/Messages.java    |    1 +
 .../org/yocto/sdk/remotetools/ShellSession.java    |    6 +++--
 .../sdk/remotetools/actions/SystemtapHandler.java  |    3 ++-
 .../sdk/remotetools/actions/SystemtapModel.java    |    6 +++--
 .../actions/SystemtapSettingDialog.java            |   28 ++++++++++++++++++++
 .../org/yocto/sdk/remotetools/messages.properties  |    1 +
 6 files changed, 40 insertions(+), 5 deletions(-)
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Messages.java +1 -0
index 66ba62b..cbf2b05 100644
@@ -40,6 +40,7 @@ public class Messages extends NLS {
 	public static String TerminalViewer_text;
 	//public static String Systemtap_KO_Text;
 	public static String Metadata_Location;
+	public static String Builddir_Location;
 	public static String User_ID;
 	public static String Remote_Host;
 	public static String Systemtap_Script;
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ShellSession.java +4 -2
index 5602798..cbc8e55 100644
@@ -66,12 +66,14 @@ public class ShellSession {
 	private String shellPath = null;
 	private final String initCmd;
 	private final File root;
+	private final File builddir;
 
 	private OutputStreamWriter out;
 
 
-	public ShellSession(int shellType, File root, String initCmd, OutputStream out) throws IOException {
+	public ShellSession(int shellType, File root, File builddir, String initCmd, OutputStream out) throws IOException {
 		this.root = root;
+		this.builddir = builddir;
 		this.initCmd  = initCmd;
 		if (out == null) {
 			this.out = new OutputStreamWriter(null);
@@ -95,7 +97,7 @@ public class ShellSession {
 		}
 
 		if (initCmd != null) {
-			execute("source " + initCmd);
+			execute("source " + initCmd + " " + builddir.getAbsolutePath());
 		}
 	}
 
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapHandler.java +2 -1
index 87094ee..dc11e39 100644
@@ -35,6 +35,7 @@ public class SystemtapHandler extends AbstractHandler {
 
 		setting.open();
 		String metadata_location = ((SystemtapSettingDialog)setting).getMetadataLocation();
+		String builddir_location = ((SystemtapSettingDialog)setting).getBuilddirLocation();
 		String remote_host = ((SystemtapSettingDialog)setting).getRemoteHost();
 		String user_id = ((SystemtapSettingDialog)setting).getUserID();
 		String systemtap_script = ((SystemtapSettingDialog)setting).getSystemtapScript();
@@ -42,7 +43,7 @@ public class SystemtapHandler extends AbstractHandler {
 
 		if(setting.open() == BaseSettingDialog.OK) {
 			IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
-			SystemtapModel op = new SystemtapModel(metadata_location,remote_host, user_id, systemtap_script,
+			SystemtapModel op = new SystemtapModel(metadata_location, builddir_location, remote_host, user_id, systemtap_script,
 					systemtap_args,window.getShell().getDisplay());
 			try {
 				progressService.busyCursorWhile(op);
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapModel.java +4 -2
index 0d22d97..c834097 100644
@@ -26,6 +26,7 @@ public class SystemtapModel extends BaseModel {
 	protected static final String SYSTEMTAP_CONSOLE = "Systemtap Console";
 	protected MessageConsole sessionConsole;
 	private String metadata_location;
+	private String builddir_location;
 	private String remote_host;
 	private String user_id;
 	private String systemtap_script;
@@ -33,9 +34,10 @@ public class SystemtapModel extends BaseModel {
 
 	Display display;
 
-	public SystemtapModel(String metadata_location, String remote_host, String user_id, String systemtap_script, String systemtap_args, Display display) {
+	public SystemtapModel(String metadata_location, String builddir_location, String remote_host, String user_id, String systemtap_script, String systemtap_args, Display display) {
 		super(null);
 		this.metadata_location=metadata_location;
+		this.builddir_location=builddir_location;
 		this.remote_host=remote_host;
 		this.user_id=user_id;
 		this.systemtap_script=systemtap_script;
@@ -68,7 +70,7 @@ public class SystemtapModel extends BaseModel {
 	throws InvocationTargetException, InterruptedException {
 		try {
 			ShellSession shell = new ShellSession(ShellSession.SHELL_TYPE_BASH, 
-												new File(this.metadata_location),
+												new File(this.metadata_location), new File(this.builddir_location),
 												DEFAULT_INIT_SCRIPT, sessionConsole.newOutputStream());
 			boolean acceptedKey = shell.ensureKnownHostKey(user_id, remote_host);
 			if (acceptedKey) {
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapSettingDialog.java +28 -0
index 8b4703c..2104ee8 100644
@@ -37,18 +37,21 @@ public class SystemtapSettingDialog extends Dialog {
 	static protected String TITLE="Systemtap Crosstap";
 	protected String title;
 	protected String metadata_location;
+	protected String builddir_location;
 	protected String systemtap_script;
 	protected String user_id;
 	protected String remote_host;
 	protected String systemtap_args;
 	protected boolean okPressed;
 	protected Button metadataLocationBtn;
+	protected Button builddirLocationBtn;
 	protected Button systemtapScriptBtn;
 	protected Text userIDText;
 	protected Text remoteHostText;
 	protected Text systemtapArgsText;
 	protected Text systemtapScriptText;
 	protected Text metadataLocationText;
+	protected Text builddirLocationText;
 
 	protected SystemtapSettingDialog(Shell parentShell, String title) {
 		super(parentShell);
@@ -75,6 +78,10 @@ public class SystemtapSettingDialog extends Dialog {
 		return metadata_location;
 	}
 
+	public String getBuilddirLocation() {
+		return builddir_location;
+	}
+
 	public String getRemoteHost() {
 		return remote_host;
 	}
@@ -119,6 +126,14 @@ public class SystemtapSettingDialog extends Dialog {
 		metadataLocationBtn = addDirSelectButton(textContainer, metadataLocationText);
 
 		label = new Label(projComp, SWT.NONE);
+		label.setText(Messages.Builddir_Location);
+		textContainer = new Composite(projComp, SWT.NONE);
+		textContainer.setLayout(new GridLayout(2, false));
+		textContainer.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		builddirLocationText = (Text)addTextControl(textContainer, builddir_location);
+		builddirLocationBtn = addDirSelectButton(textContainer, builddirLocationText);
+
+		label = new Label(projComp, SWT.NONE);
 		label.setText(Messages.User_ID);
 		userIDText = new Text(projComp, SWT.SINGLE | SWT.BORDER);
 
@@ -219,6 +234,19 @@ public class SystemtapSettingDialog extends Dialog {
 			CommonHelper.showErrorDialog("SystemTap Error", null, "The specified metadata location is not a directory!");
 			return;
 		}
+		builddir_location = builddirLocationText.getText();
+		if ( (builddir_location == null) || builddir_location.isEmpty()) {
+			CommonHelper.showErrorDialog("SystemTap Error", null, "Please specify your builddir location!");
+			return;
+		}
+		File builddir_dir = new File(builddir_location);
+		if (!builddir_dir.exists()) {
+			CommonHelper.showErrorDialog("SystemTap Error", null, "The specified builddir location does not exist!");
+		}
+		if (!metadata_dir.isDirectory()) {
+			CommonHelper.showErrorDialog("SystemTap Error", null, "The specified builddir location is not a directory!");
+			return;
+		}
 		user_id = userIDText.getText();
 		if ( (user_id == null) || user_id.isEmpty()) {
 			CommonHelper.showErrorDialog("SystemTap Error", null, "Please specify remote user id!");
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/messages.properties +0 -0
index 7bbf987..2d6d8af 100644

plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/messages.properties Powertop_ShowPid_Text=show pids in wakeups list · line 41

Quoted 7 lines
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/messages.properties +1 -0
@@ -35,6 +35,7 @@ Powertop_ShowPid_Text=show pids in wakeups list
 TerminalViewer_text=This view is dedicated to Yocto Remote tools. Please use the "Yocto Remote Tools" menu to open the view.
 //Systemtap_KO_Text=Kernel Module:
 Metadata_Location=Metadata Location:
+Builddir_Location=Build dir Location:
 User_ID=User ID:
 Remote_Host=Remote Host:
 Systemtap_Script=Systemtap Script:

Hi Jessica,

Could you give me some feedback for this patch?

Thanks,
--Adrian

#2 lore raw

Hi Andrian,

Sorry, I was traveling and missed this patch. And seems it's not applicable to the latest master. Can you rebase and resend?

Thanks,
Jessica

-----Original Message-----
From: Adrian Dudau [mailto:[email protected]]
Sent: Friday, May 03, 2013 1:53 AM
To: Zhang, Jessica
Cc: [email protected]
Subject: Re: [PATCH][eclipse-poky] systemtap: add possibility for user to point to his build folder

Quoted 237 lines · Adrian Dudau

[Yocto #4223]

---
 .../src/org/yocto/sdk/remotetools/Messages.java    |    1 +
 .../org/yocto/sdk/remotetools/ShellSession.java    |    6 +++--
 .../sdk/remotetools/actions/SystemtapHandler.java  |    3 ++-
 .../sdk/remotetools/actions/SystemtapModel.java    |    6 +++--
 .../actions/SystemtapSettingDialog.java            |   28 ++++++++++++++++++++
 .../org/yocto/sdk/remotetools/messages.properties  |    1 +
 6 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Mess ages.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Mess ages.java
index 66ba62b..cbf2b05 100644
---
a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Mess ages.java
+++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ +++ Messages.java

plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Messages.java +1 -0
@@ -40,6 +40,7 @@ public class Messages extends NLS {
      public static String TerminalViewer_text;
      //public static String Systemtap_KO_Text;
      public static String Metadata_Location;
+     public static String Builddir_Location;
      public static String User_ID;
      public static String Remote_Host;
      public static String Systemtap_Script; diff --git

a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Shel lSession.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Shel lSession.java
index 5602798..cbc8e55 100644
---
a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/Shel lSession.java
+++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ +++ ShellSession.java

plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ShellSession.java +4 -1
@@ -66,12 +66,14 @@ public class ShellSession {
      private String shellPath = null;
      private final String initCmd;
      private final File root;
+     private final File builddir;
 
      private OutputStreamWriter out;
 
 
-     public ShellSession(int shellType, File root, String initCmd, OutputStream out) throws IOException {
+     public ShellSession(int shellType, File root, File builddir, String
+initCmd, OutputStream out) throws IOException {
              this.root = root;
+             this.builddir = builddir;
              this.initCmd  = initCmd;
              if (out == null) {
                      this.out = new OutputStreamWriter(null); @@ -95,7 +97,7 @@ public
class ShellSession {
              }

              if (initCmd != null) {
plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ShellSession.java +1 -1
-                     execute("source " + initCmd);
+                     execute("source " + initCmd + " " + builddir.getAbsolutePath());
              }
      }

diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapHandler.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapHandler.java
index 87094ee..dc11e39 100644
---
a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapHandler.java
+++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ +++ actions/SystemtapHandler.java

(quoted diff) +2 -0
@@ -35,6 +35,7 @@ public class SystemtapHandler extends
 AbstractHandler {
 
              setting.open();
              String metadata_location =
 ((SystemtapSettingDialog)setting).getMetadataLocation();
+             String builddir_location =
+((SystemtapSettingDialog)setting).getBuilddirLocation();
              String remote_host = ((SystemtapSettingDialog)setting).getRemoteHost();
              String user_id = ((SystemtapSettingDialog)setting).getUserID();
              String systemtap_script =

((SystemtapSettingDialog)setting).getSystemtapScript();

plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapHandler.java +2 -1
@@ -42,7 +43,7 @@ public class SystemtapHandler extends
 AbstractHandler {
 
              if(setting.open() == BaseSettingDialog.OK) {
                      IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
-                     SystemtapModel op = new SystemtapModel(metadata_location,remote_host, user_id, systemtap_script,
+                     SystemtapModel op = new SystemtapModel(metadata_location,
+builddir_location, remote_host, user_id, systemtap_script,
                                      systemtap_args,window.getShell().getDisplay());
                      try {
                              progressService.busyCursorWhile(op);

diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapModel.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapModel.java
index 0d22d97..c834097 100644
---
a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapModel.java
+++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ +++ actions/SystemtapModel.java

plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapModel.java +7 -2
@@ -26,6 +26,7 @@ public class SystemtapModel extends BaseModel {
      protected static final String SYSTEMTAP_CONSOLE = "Systemtap Console";
      protected MessageConsole sessionConsole;
      private String metadata_location;
+     private String builddir_location;
      private String remote_host;
      private String user_id;
      private String systemtap_script;
@@ -33,9 +34,10 @@ public class SystemtapModel extends BaseModel {
 
      Display display;
 
-     public SystemtapModel(String metadata_location, String remote_host, String user_id, String systemtap_script, String systemtap_args, Display display) {
+     public SystemtapModel(String metadata_location, String
+builddir_location, String remote_host, String user_id, String
+systemtap_script, String systemtap_args, Display display) {
              super(null);
              this.metadata_location=metadata_location;
+             this.builddir_location=builddir_location;
              this.remote_host=remote_host;
              this.user_id=user_id;
              this.systemtap_script=systemtap_script;
@@ -68,7 +70,7 @@ public class SystemtapModel extends BaseModel {
      throws InvocationTargetException, InterruptedException {
              try {
                      ShellSession shell = new ShellSession(ShellSession.SHELL_TYPE_BASH,
-                                                                                             new File(this.metadata_location),
+                                                                                             new File(this.metadata_location), new
+File(this.builddir_location),
                                                                                              DEFAULT_INIT_SCRIPT, sessionConsole.newOutputStream());
                      boolean acceptedKey = shell.ensureKnownHostKey(user_id, remote_host);
                      if (acceptedKey) {

diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapSettingDialog.java b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapSettingDialog.java
index 8b4703c..2104ee8 100644
---
a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/acti ons/SystemtapSettingDialog.java
+++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ +++ actions/SystemtapSettingDialog.java

plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/actions/SystemtapSettingDialog.java +29 -0
@@ -37,18 +37,21 @@ public class SystemtapSettingDialog extends Dialog {
      static protected String TITLE="Systemtap Crosstap";
      protected String title;
      protected String metadata_location;
+     protected String builddir_location;
      protected String systemtap_script;
      protected String user_id;
      protected String remote_host;
      protected String systemtap_args;
      protected boolean okPressed;
      protected Button metadataLocationBtn;
+     protected Button builddirLocationBtn;
      protected Button systemtapScriptBtn;
      protected Text userIDText;
      protected Text remoteHostText;
      protected Text systemtapArgsText;
      protected Text systemtapScriptText;
      protected Text metadataLocationText;
+     protected Text builddirLocationText;
 
      protected SystemtapSettingDialog(Shell parentShell, String title) {
              super(parentShell);
@@ -75,6 +78,10 @@ public class SystemtapSettingDialog extends Dialog {
              return metadata_location;
      }
 
+     public String getBuilddirLocation() {
+             return builddir_location;
+     }
+
      public String getRemoteHost() {
              return remote_host;
      }
@@ -119,6 +126,14 @@ public class SystemtapSettingDialog extends Dialog {
              metadataLocationBtn = addDirSelectButton(textContainer,
 metadataLocationText);
 
              label = new Label(projComp, SWT.NONE);
+             label.setText(Messages.Builddir_Location);
+             textContainer = new Composite(projComp, SWT.NONE);
+             textContainer.setLayout(new GridLayout(2, false));
+             textContainer.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+             builddirLocationText = (Text)addTextControl(textContainer, builddir_location);
+             builddirLocationBtn = addDirSelectButton(textContainer,
+builddirLocationText);
+
+             label = new Label(projComp, SWT.NONE);
              label.setText(Messages.User_ID);
              userIDText = new Text(projComp, SWT.SINGLE | SWT.BORDER);
@@ -219,6 +234,19 @@ public class SystemtapSettingDialog extends Dialog {
                      CommonHelper.showErrorDialog("SystemTap Error", null, "The specified metadata location is not a directory!");
                      return;
              }
+             builddir_location = builddirLocationText.getText();
+             if ( (builddir_location == null) || builddir_location.isEmpty()) {
+                     CommonHelper.showErrorDialog("SystemTap Error", null, "Please specify your builddir location!");
+                     return;
+             }
+             File builddir_dir = new File(builddir_location);
+             if (!builddir_dir.exists()) {
+                     CommonHelper.showErrorDialog("SystemTap Error", null, "The specified builddir location does not exist!");
+             }
+             if (!metadata_dir.isDirectory()) {
+                     CommonHelper.showErrorDialog("SystemTap Error", null, "The specified builddir location is not a directory!");
+                     return;
+             }
              user_id = userIDText.getText();
              if ( (user_id == null) || user_id.isEmpty()) {
                      CommonHelper.showErrorDialog("SystemTap Error", null, "Please

specify remote user id!"); diff --git a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/mess ages.properties b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/mess ages.properties
index 7bbf987..2d6d8af 100644
---
a/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/mess ages.properties
+++ b/plugins/org.yocto.sdk.remotetools/src/org/yocto/sdk/remotetools/ +++ messages.properties

(quoted diff) +0 -0
@@ -35,6 +35,7 @@ Powertop_ShowPid_Text=show pids in wakeups list
Quoted 7 lines

TerminalViewer_text=This view is dedicated to Yocto Remote tools. Please use the "Yocto Remote Tools" menu to open the view.
//Systemtap_KO_Text=Kernel Module:
Metadata_Location=Metadata Location:
+Builddir_Location=Build dir Location:
User_ID=User ID:
Remote_Host=Remote Host:
Systemtap_Script=Systemtap Script:

Hi Jessica,

Could you give me some feedback for this patch?

Thanks,
--Adrian