home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!gatech!concert!sas!mozart.unx.sas.com!walker
- From: walker@twix.unx.sas.com (Doug Walker)
- Subject: Re: Programming is getting painful!
- Originator: walker@twix.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <C0p0Fq.CD9@unx.sas.com>
- Date: Mon, 11 Jan 1993 14:04:37 GMT
- References: <C0IwoG.7ow@usenet.ucs.indiana.edu> <C0JIKp.I6D@unx.sas.com> <1993Jan9.200742.11858@polaris.utu.fi>
- Nntp-Posting-Host: twix.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 60
-
-
- In article <1993Jan9.200742.11858@polaris.utu.fi>, sutela@polaris.utu.fi (Kari Sutela) writes:
- |> walker@twix.unx.sas.com (Doug Walker) writes:
- |>
- |> >Version 6.x, the CPR debugger will automatically use enforcer to
- |> >stop your program at the location that is causing the enforcer hit;
- |>
- |> Now that you mention it: Is there any other way to proceed than "jump"
- |> over the statement which caused the hit? I saw no mention of this
- |> feature in the documentation (the readme files mention it briefly). A
- |> very nice feature, though.
-
- When you get an Enforcer hit, something has gone wrong and invalid
- memory is being addressed. If you simply attempt to continue, you
- will probably hit the same situation again, since the registers
- will not have changed. You can fix up the Enforcer hit by modifying
- registers using the SET or REGISTER commands. For example, let's say
- the following instruction generates an Enforcer hit:
-
- MOVE.L D0,(A0)
-
- where register A0 contains a zero (or some other invalid address.)
- You can fix it by modifying register A0 with the REGISTER or SET
- commands so that it points to valid memory. You can even do this
- with a macro, as shown below. (For this example, assume that A0
- is supposed to be the address of the variable 'x', but somehow you
- forgot to set it in your code):
-
- break $ {register A0 = &x; go}
- register A0 = &x
- go
-
- The $ says to set the breakpoint at the current location. When the
- breakpoint is hit, register A0 will be set to the address of the
- variable 'x' and execution will continue. The next two statements
- set A0 for this occurrence and continue.
-
- Of course, the same thing applies to the JUMP command:
-
- break $ {jump nn; go}
- jump 0xADDRESS
- go
-
- There is also one further thing you can do: turn off Enforcer for
- the remainder of the CPR session. If you disable Enforcer, the
- Enforcer hits won't be generated and CPR won't catch them. Use
- a CPR AREXX macro or go to an external CLI to disable Enforcer.
-
- |>
- |> --
- |> Kari Sutela sutela@utu.fi
- --
- *****
- =*|_o_o|\\=====Doug Walker, Software Distiller====== BBS: (919)460-7430 =
- *|. o.| || 1200/2400/9600 Dual
- | o |// For all you do, this bug's for you!
- ======
- usenet: walker@unx.sas.com bix: djwalker
- Any opinions expressed are mine, not those of SAS Institute, Inc.
-
-