[Info-vax] Program debugging, was: Re: HP wins Oracle Itanium case
John Wallace
johnwallace4 at gmail.com
Sat Aug 25 10:08:02 EDT 2012
On Aug 24, 1:58 pm, Paul Sture <nos... at sture.ch> wrote:
> On Fri, 24 Aug 2012 11:26:48 +0000, Simon Clubley wrote:
> > On 2012-08-24, Johnny Billquist <b... at softjar.se> wrote:
>
> >> I know of places and people who are known for their skills, including
> >> people who even invented some of the programming languages used today,
> >> as well as doing the compilers you use. And I still don't see any
> >> programs that works right the first time.
>
> > My programs generally don't work the first time, but thinking through
> > the actual results instead of the expected results and looking at my
> > code does reveal the problem rather quickly in a surprising number of
> > cases, including in embedded code, without having to resort to a
> > debugger.
>
> That's the sort of thing I was talking about. The debugger simply isn't
> the first thing I reach for.
>
> > I do find a LED handy for debugging interrupt handlers sometimes
> > however.
>
> That's akin to print statements to see that you are getting what you
> expect.
>
> I did once write a reasonably complex bit of DCL in one go and was amazed
> to see it work as intended on the very first run. Normally I would have
> expected at least one typo. It did break a few months later, but that
> was because new data in a totally unexpected format started appearing.
>
> --
> Paul Sture
Using an LED is surely more akin to the days of switch registers and
front panels?
Although hard switch registers and lights may have died out in the era
of the 11/70, one 16bit OS I used many years ago had a handy facility
where you could use the OS and the 16 LEDs on the front panel to view
the contents of any accessible location. You pick an address to
monitor, the OS has a documented location whose contents are the
address to be monitored, and every clock tick the OS reads this
documented location, fetches the contents of the desired address, and
writes them to the front panel LEDs. All the user needs to do is set
the value in the documented location. Simple and remarkably effective.
(TXDS, on TI 990/4?).
More information about the Info-vax
mailing list