home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / 21033 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.4 KB  |  27 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!europa.asd.contel.com!awds.imsd.contel.com!mh
  3. From: mh@awds.imsd.contel.com (Mike Hoegeman)
  4. Subject: Re: How does one debug a server using dbx/gdb?
  5. Message-ID: <1993Jan12.063159.14863@awds.imsd.contel.com>
  6. Organization: GTE Weather Systems, Westlake Village, CA
  7. References: <7326@ucsbcsl.ucsb.edu>
  8. Date: Tue, 12 Jan 1993 06:31:59 GMT
  9. Lines: 16
  10.  
  11. In article <7326@ucsbcsl.ucsb.edu> doug@foxtrot.ccmrc.ucsb.edu (Douglas Scott) writes:
  12. >Is there a special trick to debug an X server binary using gdb or dbx?  That
  13. >is, how can you start it up and have the debugger be able to follow the
  14. >progress from the beginning, given that the server is normally started via
  15. >xinit?  I know that I can start it normally and then attach to the process,
  16. >but how would I debug it from the very beginning?
  17.  
  18. You can do something cheesy like in main() put a a call to pause() or
  19. select() if some magic environment variable is set. Then the server
  20. will just sit there in the pause and you can attach to it at your
  21. leasure. once you are attached just do something that will cause pause
  22. to return like ^C.
  23. -- 
  24. ------------------------------------------------------------------------------
  25. Mike Hoegeman               email: mh@wx.gtegsc.com  tel: (818)706-4145
  26. GTE Weather Systems Group   31717 La Tienda Dr, Westlake Village CA. 91359
  27.