From: kbongers Date: Mon, 6 Aug 2001 00:15:09 +0000 (+0000) Subject: fill with notes X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=5c233ef3af8b82fddbe3959b24716f9cb2fc3873;p=fw%2Fsdcc fill with notes git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1129 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/debugger/README b/debugger/README index b9e1031d..b080eef3 100644 --- a/debugger/README +++ b/debugger/README @@ -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 :)