From: Niclas F. <ni...@us...> - 2010-08-26 14:10:52
|
Update of /cvsroot/contiki/contiki-2.x/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5236/apps/mspsim/src/se/sics/cooja/mspmote Modified Files: MspMoteType.java Log Message: Updated to allow MSPSim emulated nodes without debug information (the debug information generated by mspgcc4 is not yet supported). Index: MspMoteType.java =================================================================== RCS file: /cvsroot/contiki/contiki-2.x/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/MspMoteType.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** MspMoteType.java 26 Mar 2010 12:29:11 -0000 1.35 --- MspMoteType.java 26 Aug 2010 14:10:42 -0000 1.36 *************** *** 391,400 **** public static Hashtable<File, Hashtable<Integer, Integer>> getFirmwareDebugInfo(ELF elf) { - /* Fetch all executable addresses */ - ArrayList<Integer> addresses = elf.getDebug().getExecutableAddresses(); - Hashtable<File, Hashtable<Integer, Integer>> fileToLineHash = new Hashtable<File, Hashtable<Integer, Integer>>(); for (int address: addresses) { DebugInfo info = elf.getDebugInfo(address); --- 391,405 ---- public static Hashtable<File, Hashtable<Integer, Integer>> getFirmwareDebugInfo(ELF elf) { Hashtable<File, Hashtable<Integer, Integer>> fileToLineHash = new Hashtable<File, Hashtable<Integer, Integer>>(); + if (elf.getDebug() == null) { + // No debug information is available + return fileToLineHash; + } + + /* Fetch all executable addresses */ + ArrayList<Integer> addresses = elf.getDebug().getExecutableAddresses(); + for (int address: addresses) { DebugInfo info = elf.getDebugInfo(address); |