mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-10 11:29:38 +00:00
implementing getExecutionDetails() by returning a stack trace
This commit is contained in:
parent
fb2966fe3f
commit
3deb4408df
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: MspMote.java,v 1.46 2010/05/17 09:57:31 fros4943 Exp $
|
* $Id: MspMote.java,v 1.47 2010/08/13 10:18:54 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.mspmote;
|
package se.sics.cooja.mspmote;
|
||||||
@ -369,10 +369,15 @@ public abstract class MspMote extends AbstractEmulatedMote implements Mote, Watc
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String sendCLICommandAndPrint(String cmd) {
|
public String sendCLICommandAndPrint(String cmd) {
|
||||||
|
String response = executeCLICommand(cmd);
|
||||||
|
logger.fatal(response);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String executeCLICommand(String cmd) {
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
LineListener tmp = new LineListener() {
|
LineListener tmp = new LineListener() {
|
||||||
public void lineRead(String line) {
|
public void lineRead(String line) {
|
||||||
logger.fatal(line);
|
|
||||||
sb.append(line + "\n");
|
sb.append(line + "\n");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -488,4 +493,8 @@ public abstract class MspMote extends AbstractEmulatedMote implements Mote, Watc
|
|||||||
return breakpointsContainer;
|
return breakpointsContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getExecutionDetails() {
|
||||||
|
return executeCLICommand("stacktrace");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user