Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!adiron!tro From: tro@adiron.uucp (Tom Olin) Newsgroups: comp.windows.x Subject: Re: How do you use an Xterm with a debugger Message-ID: <3558@adiron.UUCP> Date: 19 Mar 91 14:16:54 GMT References: <1991Mar13.011536.17184@motcad.portal.com> <1991Mar14.072808.20247@Think.COM> <1991Mar15.074424.857@servalan.uucp> <1991Mar17.072157.19385@Think.COM> Sender: tro@adiron.UUCP Organization: PAR Technology Corporation Lines: 13 In-reply-to: barmar@think.com's message of 17 Mar 91 07:21:57 GMT In article <1991Mar17.072157.19385@Think.COM> barmar@think.com (Barry Margolin) writes: Gdb has an "attach" command that allows it to be used to debug a process that is already running.... The only problem with this approach is that ... if the buggy area of the program is run early you may not be able to attach quickly enough. The way around this is to put a sleep(30) or so at the beginning of main(). That gives you plenty of time to attach. -- Tom Olin uunet!adiron!tro (315) 738-0600 Ext 638 PAR Technology Corporation * 220 Seneca Turnpike * New Hartford NY 13413-1191