[comp.sys.mac.programmer] Setting SADE Breakpoints

bwbecker@watdragon.waterloo.edu (Byron Weber Becker) (02/06/90)

I just got my hands on SADE and am having a problem setting
breakpoints.  I can set them with the statement
	break \unitname.procname.(1)

What I really want to do, however, is set them by pointing 
to the source line and using the "Break" command in the 
SourceCmds menu.  When I do this, however, I get a dialog
box which says
	"Cannot determine break address:  Could not determine
	address from available source information."

I've got "-sym on" on all the compiler (C), librarian and linker
commands.  

SADE seems to do the expected things (display the stack, print 
variables, etc) EXCEPT for when it needs to go from a source
line to an address or, in some cases, from an address to a 
source line.

Any clues where I've gone wrong?

Another question:  I can't seem to get SADE to open a window
read-only and then subsequently edit and save it in MPW without
having the file system complain when saving.  It doesn't like 
SADE also having it open.  Any way to debug and edit the same file
in SADE and MPW?

Thanks for the help,

Byron Weber Becker
bwbecker@watdragon.waterloo.edu

bowman@reed.UUCP (Eric Bowman) (02/06/90)

There could be, I think, 2 possible reasons for why you aren't able
to set a breakpoint.

First, you've got to make sure SADE knows what program you debugging.
I keep a little PROC in SadeUserStartup for the current program I'm
working on, which looks something like this:

proc Launcher;
	directory 'UncleBoBo:BoBo:Projects:LauncherInstall:';
	sourcepath 'UncleBoBo:BoBo:Projects:LauncherInstall:';
	target 'LaunchInstallDebug';
	break main.(1);
	launch	'LaunchInstallDebug';
end;

Then I just type "Launcher" and it breaks at main.(1).  I think after
the target command, you can open a source file and set a breakpoint;
this would make sense, but I've found that SADE is not guaranteed to
make since (is it just me, or is printf really annoying?)

Another possible problem involves static functions in C.  I've found
that I can't seem to set a breakpoint in a static function until I'm
inside a global function in the same source file as the static function.

Hope this helps.

==============================================================================
| The Insidious Uncle BoBo                                                   |
------------------------------------------------------------------------------
|  "As I see it, my friends can access my private                            |
|   members in a public class..."                                            |
==============================================================================
| Eric Bowman ->                                                             |
| ShitNet:         bowman@reed.bitnet                                        |
| FarFromFreeNet:  (503)234-7158  (Like I'll Really Answer)                  |
| Disclaimer: "If my employer ever found out my opinions, well..."           |
/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=\=/=

					

lins@Apple.COM (Chuck Lins) (02/07/90)

In article <14072@reed.UUCP> bowman@reed.UUCP (Eric Bowman) writes:
>make since (is it just me, or is printf really annoying?)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^

Personally, I find printf really annoying too. But then again I'd like to see
a symbolic debugger more along the line of the Think debuggers. Well, I'd also
like to see a Think Modula-2. :-) I can keep dreaming.


-- 
Chuck Lins               | "Exit left to funway."
Apple Computer, Inc.     | Internet: lins@apple.com
20525 Mariani Avenue     | AppleLink: LINS
Mail Stop 41-K           | 
Cupertino, CA 95014      | "Self-proclaimed Object Oberon Evangelist"
The intersection of Apple's ideas and my ideas yields the empty set.