fill with notes
authorkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 6 Aug 2001 00:15:09 +0000 (00:15 +0000)
committerkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 6 Aug 2001 00:15:09 +0000 (00:15 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1129 4a8a32a2-be11-0410-ad9d-d568d2c75423

debugger/README

index b9e1031d3edbaf589bad275a0465a9ab3e172179..b080eef303ad5712b84605d597a004ece8156805 100644 (file)
@@ -1,4 +1,71 @@
 sdcc/debugger
 -------------
+Notes Aug 4, 2001 - Karl Bongers
+
+The debugger appears to have been broken
+for quite some time.  My guess is that Sandeep originally had it
+working in the 1999-2000 year timeframe, but then changes to the
+command structure in ucSim(simulator) caused it to be busted for
+quite a long time.
+
+I got it working under Linux, a number of ucSim commands
+changed syntax.  Including are:
+Changed "g" command to "run".
+Changed "dr" to "info register".
+Changed l filename.ihx to l "filename.ihx" (the quotes are required
+  by ucSim, and can be a confusing issue with the load(l) command.
+
+Also I had to add a "step" command prior to a "run" command
+when it is desired to resume execution so that ucSim does not
+stop on the same breakpoint we are currently at.
+
+I have not tried compiling or running under Cygwin/Windows.
+
+Issues:
+======================
+* The source line #'s may be out of sync with the breakpoints and
+assembly.  I'm not sure, today it seemed close but not exact, while
+yesterday on a diferent test program it seemed several lines off...
+
+* An initial "run" command must be issued to start up debugging.  The
+debugger refuses to list code or insert breaks on initial startup.
+The debugger builds up a context as it runs and it doesn't want to
+do the code listings or breaks until it has some context.  This
+doesn't seem right to me, you should be able to insert breaks
+or list code immediately.  This needs to be looked at.
+
+Work arounds:
+======================
+Compile with --debug option:
+sdcc --debug hi.c
+
+Load sdcdb, like this:
+sdcdb hi
+
+Then you need to do an initial "run" command.  It should stop at the
+main() entrypoint and give a message about a non-user breakpoint.
+
+Now you should be able to list code, and set breakpoints.  Type
+"c" to continue running to a breakpoint, or type "step" to single
+step.
+
+Use a preceeding bang("!") to do s51 simulator commands.  So for
+example:
+!pc
+will send the "pc" command to ucSim and
+give you the program counter and list the current line of assembly.
+!help
+will give you the brief command line help listing of ucSim.  But
+this help will scroll of the screen.  So to get a list, I redirect
+stdout to a text file to examine like this:
+sdcdb hi 2>&1 | tee sdcdb.log
+
+Slacker Notes:
+======================
+To debug, it can be helpful to turn on verbose debug dumps
+by uncommenting #define SDCDB_DEBUG in sdcdb.h.
+
+
+End Notes Aug 4, 2001 - Karl Bongers
+--------------
 
-I (MLH) no nothing about this directory :)