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 Organization: Kernel Mode Systems, San Diego, CA Lines: 33 To: Info-VAX@KL.SRI.COM X-Gateway-Source-Info: USENET 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 > : [...] > : Now, if I want to debug the code for one of those events, I just set a > : watchpoint on the associated counter! > > But be aware that for watchpoints the debugger must change the protection of > the page(s) where such variables reside and if other often changing data > happens to be near there, performance can drop to 1/100 or 1/1000 ! > > In VAX C, I would declare the first error counter _align(page) and after the > last another static int _align(page) dummy to be sure... This is a good point... In most of my code there isn't much writing going on in global storage, almost everything is in either automatic variables (on the stack in p1 space) or dynamically allocated via malloc(). There are usually a few global queue headers to which the dynamically allocated things are chained, but these don't happen often. So there isn't much speed penalty. But, yes, in the general case, using page alignments to force these "condition counters" (not all the conditions are errors) to a page of their own is a good idea. Either way, it beats "debugging with printf()'s" six ways from zero... --- Jamie Hanrahan, Kernel Mode Systems, San Diego CA drivers, internals, networks, applications, and training for VMS and Windows NT uucp 'g' protocol guru and release coordinator, VMSnet (DECUS uucp) W.G., and Chair, Programming and Internals Working Group, U.S. DECUS VMS Systems SIG Internet: jeh@cmkrnl.com Uucp: uunet!cmkrnl!jeh CIS: 74140,2055