summary history branches tags files
commit:6e144203e9d7240e22a1bed506dbeb96cd612ec5
author:mrmekon
committer:mrmekon
date:Thu Nov 8 16:12:22 2012 -0500
parents:6c3ddab6627857f1caa6821d0048fcb63ae04607
Example output in readme.  Detect missing file on load attempt.
diff --git a/README.md b/README.md
line changes: +54/-0
index b122c35..3bc7482
--- a/README.md
+++ b/README.md
@@ -10,6 +10,60 @@ For now this is an early demonstration, working only with the PICkit3 and PIC32M
 Verify path to JARs is correct in picdb.sh, and run picdb.sh.
 
 
+Example session
+=====
+$ picdb.sh 
+PICdb> connect PIC32MX150F128B    
+content/mplab/mplab.deviceSupport
+content/mplab/MPHeader.xml
+content/mplab/PluginBoardSupport.xml
+Connecting to PICkit3...
+Nov 8, 2012 4:09:08 PM com.microchip.mplab.mdbcore.RealICETool.RIMessages OutputMessage
+INFO: 
+
+PICdb> load test.elf
+Loading ELF file...
+Resetting target...
+PC: 0xBFC00000
+PICdb> break 0x9D00B8C8
+New breakpoint at 0x9D00B8C8 (MainDemo.c:431)
+PICdb> break 0x9D00B982
+New breakpoint at 0x9D00B982 (MainDemo.c:534)
+PICdb> breakpoints
+All breakpoints:
+0: 0x9D00B8C8 (MainDemo.c:431) *
+1: 0x9D00B982 (MainDemo.c:534) *
+PICdb> continue
+Breakpoint 1: Stopped at 0x9D00B982 (MainDemo.c:534)
+PICdb> step
+PC: 0x9D00B982  (MainDemo.c:534)  (LW V0, -32416(S0))
+PICdb> print pc
+PC: 0x9D00B9AC
+PICdb> continue
+Breakpoint 0: Stopped at 0x9D00B8C8 (MainDemo.c:431)
+PICdb> 
+PICdb> help
+Type 'help <topic>' for help.
+
+print               
+continue            
+step                Step over next source line.
+break               
+connect             Conects to a PIC target.
+breakpoints         
+help                Displays this help.
+quit                Quits this program.
+load                Load ELF file onto target.
+
+PICdb> help connect
+
+Connects to a PIC target.
+Usage: connect <PIC device>
+ex: connect PIC32MX150F128B
+
+PICdb>   
+
+
 Reverse engineering notes
 =====
 

diff --git a/mdb/picdebugger.py b/mdb/picdebugger.py
line changes: +5/-0
index 1434405..35312aa
--- a/mdb/picdebugger.py
+++ b/mdb/picdebugger.py
@@ -10,10 +10,12 @@ from com.microchip.mplab.mdbcore.debugger import Debugger
 from com.microchip.mplab.mdbcore.debugger import DebugException
 from com.microchip.mplab.mdbcore.debugger import ToolEvent
 from com.microchip.mplab.mdbcore.loader import Loader
+from com.microchip.mplab.mdbcore.loader import LoadException
 from com.microchip.mplab.mdbcore.translator.interfaces import ITranslator
 from com.microchip.mplab.mdbcore.translator.exceptions import TranslatorException
 from com.microchip.mplab.mdbcore.disasm import DisAsm
 from com.microchip.mplab.mdbcore.memory.memorytypes import ProgramMemory
+from com.microchip.mplab.mdbcore.objectfileparsing.exception import ProgramFileParsingException
 
 from com.microchip.mplab.mdbcore.ControlPointMediator.ControlPoint import BreakType
 from com.microchip.mplab.mdbcore.ControlPointMediator import ControlPointMediator
@@ -126,6 +128,9 @@ class picdebugger(com.microchip.mplab.util.observers.Observer):
         except DebugException:
             print "Failed to load ELF onto target."
             return False
+        except LoadException:
+            print "File not found."
+            return False
         return True
 
     def testSourceLookup(self):