#: 14194 S12/OS9/68000 (OSK)
04-Feb-92 14:46:57
Sb: OSK bus traps
Fm: Timothy J. Martin 71541,3611
To: 72176,3565 (X)
I felt guilty about the last remark on bus trap errors. I should put up or
shutup so to speak. I find the problem in line 145 of my version of whereis.c,
which reads as follows:
if( s = index( s, '"' ) ) *s = '\0';
It should be changed to:
if( s = index( as, '"' ) ) *s = '\0';
The value of "s" gets set to zero two lines earlier by an unsuccessful index
function. The memory management objects to the access to address 0 in line
145, and causes a bus trap error. Nicely enough, the value of "s" was saved
earlier in "as", for proper use later, and can also be used here in line 145,
thus "s" is changed to "as" in line 145.
The microware source level debugger (srcdbg) helps greatly in tracking these
problems, and running programs under memory management with srcdbg sure makes
these problems easier to find.
|