🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.msdos.programmer
3 messages
3 total messages Started by S. Srinivasan Fri, 03 Aug 1990 17:20
MSC 6.0 does not execute lines of C code
#1778
Author: S. Srinivasan
Date: Fri, 03 Aug 1990 17:20
46 lines
1888 bytes
This is a posting for a friend who does not have net access
-----------------------------------------------------------

System: MSC 6.0, Medium Model, Multi-module(i.e. LINK used)
	on a '286-clone

There are occasions when writing 'C' code that a line of
code is just not executed at all.  For example, 

    *stepping in Codeview simply jumps over the source line!

    *cannot set breakpoint on source line in Codeview,
     it beeps back!!

Looking at the .COD file (produced by /Fc option?), 
which has both the 'C' source and 'ASM' lines, the correct 
ASM lines are generated.  So the culprit could be the
LINK-er, but there seems to be no way around the problem.
Sometimes retyping the whole function makes the problem go
away.  There is no pattern to this: it happens at the start
of a function, or in the middle of a function.

Once it was a call to an assembly routine:

	result = asm_routine();

and the problem went away when the routine was coded to work as:

	asm_routine(&result);

Another time it was a simple 'C' operation:

	variable = ~variable;

which refused to go away regardless of re-typing or anything else

-----------------------------------------------------------
Totally baffled !
Please respond to this account, and I will convince my friend
that USENET access is something worth shouting about.

Thanks a bunch,

srini@ultra.com
    -or-
...!ames!ultra.com!srini
Re: MSC 6.0 does not execute lines of C code
#1793
Author: Avram SPOLSKY
Date: Sun, 05 Aug 1990 22:23
18 lines
996 bytes
In article <1990Aug3.172039.250@ultra.com> srini@ultra.com (S. Srinivasan) writes:
>
>    *stepping in Codeview simply jumps over the source line!
>

The source line may have been optimized away. Try turning off all
optimizations when debugging.

>    *cannot set breakpoint on source line in Codeview,
>     it beeps back!!
>

Same reason. I seem to remember that this is well documented...

Joel Spolsky
(disclaimer: I don't speak for anybody, and certainly not
for my employer).
spolsky@cs.yale.edu
Re: MSC 6.0 does not execute lines of C code
#1799
Author: Robert McGwier
Date: Mon, 06 Aug 1990 15:56
23 lines
1148 bytes
From article <1990Aug3.172039.250@ultra.com>, by srini@ultra.com (S. Srinivasan):
> 
>     *stepping in Codeview simply jumps over the source line!
> 
>     *cannot set breakpoint on source line in Codeview,
>      it beeps back!!
> 
> Totally baffled !
>



It is extremely well documented in the manuals for codeview (or most other
debuggers for that matter), you MUST turn off ALL optimizations when
doing source level debugging.

Bob
 
-- 
____________________________________________________________________________
    My opinions are my own no matter	|	Robert W. McGwier, N4HY
    who I work for! ;-)			|	CCR, AMSAT, etc.
----------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads