Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uakari.primate.wisc.edu!sdd.hp.com!swrinde!ucsd!ucbvax!ALEX.CSS.GOV!lynnes From: lynnes@ALEX.CSS.GOV (Christopher Lynnes) Newsgroups: comp.windows.x.motif Subject: Re: Anyone got any neat trick Message-ID: <9105031406.AA15649@alex.CSS.GOV> Date: 3 May 91 14:06:20 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 20 >I'm trying to track down an illusive bug. It appears that an XmString >is getting trounced on. If it were any *normal* data type I'd just >display it in dbx and then step through the program and watch for it >to get trashed. But !@#$% Motif compound strings are opaque, and there's >no easy way that I've found to "watch" what's happening to one. > >Has anyone else got any clever tricks for doing this? Conor Cahill (virtech!cpcahil@uunet.UU.NET) has developed a very useful malloc library that you link in place of the system library, that provides some quite useful debugging properties, like array bounds checking. The only drawbacks are: (1) that it is quite slow with Motif applications due to all the malloc'ing (2) you usually have to free an array before you can tell that it has been exceeded. I generally use it when I'm at my wit's end. Chris Lynnes