|
Page 1 of 1
|
[ 3 posts ] |
|
1.40 debugger: stop runtime? view of local vars? exceptions?
| Author |
Message |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
 1.40 debugger: stop runtime? view of local vars? exceptions?
hello,
in case of runtime errors caused by invalid math operations
- e. g. caused by division by zero, or square root of a negative number
- other operations that lead to nan's ,
1. the debugger should stop the execution at the faulty line automatically, and
2. there should be a way to check all corresponding local and temporary variables at this moment to find out the reason of the wrong calculation.
3. In case one even expects that an error might happen, there could be sort of exception handling; in JAVA there is a
try... throw exception
construct, but I unfortunately don't know the corresponding C commands.
Are there already such chances?
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Tue Aug 05, 2008 6:11 am |
|
 |
|
Dick Swan
Creator
Joined: Fri Feb 09, 2007 9:21 am Posts: 613
|
 Re: 1.40 debugger: stop runtime? view of local vars? exceptions?
C++ has a "TRY and CATCH" mechanism similar to the JAVA method. There is not a corresponding capability in the C language.
ROBOTC does catch many run-time exceptions and suspends your program. You can then manually examine program variables and the PC to determine the cause of the bug.
|
| Fri Aug 15, 2008 3:58 am |
|
 |
|
Ford Prefect
Senior Roboticist
Joined: Sat Mar 01, 2008 12:52 pm Posts: 936 Location: a small planet in the vicinity of Beteigeuze
|
 Re: 1.40 debugger: stop runtime? view of local vars? exceptions?
hello, thx for the reply. As I recently wrote even in the bug tracker, the debugger doesn't stop the program execution in time, so that it's not possible to check the related variables in different tasks just when e.g. a nan error occurs (just like it does in case of wrong array bounds). In the bug tracker, I sent you a program source and above that a variable file "memory.dat", which contains the saved structure variable data just 1 step before the "-nan" errors occur. Maybe you can check this and then tell us how this happens and/or how to search for the related bug(s) or malfunction(s).
_________________ Ford Prefect
Never purchase release 1.x ! (ancient programmer's wisdom) "Don't argue with idiots. They'll drag you down to their level and then beat you with experience."
|
| Fri Aug 15, 2008 4:15 am |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|