TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: all
from: Mark Wuest 74030,332
date: 1990-11-12 10:33:35
subject: #global labels in `c`

#: 8134 S3/Languages
    12-Nov-90  10:33:35
Sb: #global labels in "c"
Fm: Mark Wuest 74030,332
To: all

I just tried to put my very first label in a "c" program to no avail. I've
never used "goto", and do not need it now. What I want is to put a global label
in so that sysdbg can be used to put a breakpoint in the code without having to
disasemble a rather lengthy function looking for the right place.

 Here's what my code looked like:
 if(a){
     dothis();
     dothat();
 }
 else{
 FOO:
     x = -1;
 }
 When I tried to find FOO in the symbol table with sysdbg, I could not find it.
When I tried to put a breakpoint at it ("b FOO"), sysdbg complained with
"breakpoint at odd address" and did not put one there.
 Ok, all you non-structured (and proud of it!) goto'ers out there, how do I put
a global label in a function? (We worked around it with a function that just
did the "x = -1" and returned.)
 Mark

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.