home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 20129 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.6 KB  |  42 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!world!ivanski
  3. From: ivanski@world.std.com (Ivan M CaveroBelaunde)
  4. Subject: Re: I will kill or die for this tool
  5. Message-ID: <BzLI8K.Fso@world.std.com>
  6. Organization: The World Public Access UNIX, Brookline, MA
  7. References: <1992Dec21.043540.20183@hobbes.kzoo.edu>
  8. Date: Mon, 21 Dec 1992 06:05:07 GMT
  9. Lines: 31
  10.  
  11. k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
  12.  
  13. >Might some enterprising developer want to write a Macsbug dcmd that will
  14. >keep track of the state of a handle/resource?  It would trap _HLock,
  15. >_HUnlock, _HPurge, _HNoPurge, _AddResource, _DetachResource,
  16. >_ReleaseResource, and _DisposHandle, oh yeah and _HSetState too.  You
  17. >tell it to keep track of a certain handle, and to drop into Macsbug when
  18. >its state changes a certain way.
  19.  
  20. >See, I have this resource, and the code goes through some incredible
  21. >gyrations to keep it locked when necessary and unlocked when not, and
  22. >it's screwing up somewhere between function X and function Y.  If I
  23. >could just break into Macsbug at X, find the resource, tell this dcmd to
  24. >keep its eye out for any calls that unlock it, and continue, I'd be home
  25. >free.  I've been trying to track it down, and after several hours and
  26. >thousands of lines of code (one at a time), I'm not any closer.
  27.  
  28. The following lines (or something along these lines - I'm a little fried
  29. right now) should do it:
  30.  
  31. atb DisposHandle rA0=myHandle
  32.     (this one will work for any other mem mgr trap as well)
  33. atb ReleaseResource rA7^=myHandle
  34.     (this one will work for the resource calls)
  35.  
  36. Hope this helps.
  37.  
  38. -Ivan
  39. ---
  40. Ivan Cavero Belaunde (ivanski@world.std.com)
  41. DiVA Corporation
  42.