A From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM"  5-MAY-1993 13:15:32.04  To:	EVERHART CC:	: Subj:	Re: Need help debugging detached processes (REQUEST)   From: jeh@cmkrnl.com X-Newsgroups: comp.os.vms = Subject: Re: Need help debugging detached processes (REQUEST) - Message-ID: <1993May5.044251.1944@cmkrnl.com>  Date: 5 May 93 04:42:50 PDT  Distribution: world 0 Organization: Kernel Mode Systems, San Diego, CA	 Lines: 33  To: Info-VAX@KL.SRI.COM  X-Gateway-Source-Info: USENET   l In article <1s72nq$jnf@nz12.rz.uni-karlsruhe.de>, DAHMS@ifk20.mach.uni-karlsruhe.de (Heribert Dahms) writes:= > In <1993May4.132948.1941@cmkrnl.com> jeh@cmkrnl.com writes:  >  > [...] . > : I define a set of global variables such as	 > : [...] J > : Now, if I want to debug the code for one of those events, I just set a+ > : watchpoint on the associated counter!    > N > But be aware that for watchpoints the debugger must change the protection ofJ > the page(s) where such variables reside and if other often changing dataF > happens to be near there, performance can drop to 1/100 or 1/1000 !  > N > In VAX C, I would declare the first error counter _align(page) and after theB > last another     static int _align(page) dummy     to be sure...  O This is a good point... In most of my code there isn't much writing going on in J global storage, almost everything is in either automatic variables (on theN stack in p1 space) or dynamically allocated via malloc().  There are usually aO few global queue headers to which the dynamically allocated things are chained, B but these don't happen often.  So there isn't much speed penalty.   N But, yes, in the general case, using page alignments to force these "conditionN counters" (not all the conditions are errors) to a page of their own is a good idea.     F Either way, it beats "debugging with printf()'s" six ways from zero...  6 	--- Jamie Hanrahan, Kernel Mode Systems, San Diego CAO drivers, internals, networks, applications, and training for VMS and Windows NT N uucp 'g' protocol guru and release coordinator, VMSnet (DECUS uucp) W.G., and K Chair, Programming and Internals Working Group, U.S. DECUS VMS Systems SIG  B Internet:  jeh@cmkrnl.com  Uucp: uunet!cmkrnl!jeh  CIS: 74140,2055  