Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat Newsgroups: comp.os.linux.development.system Subject: Re: Starting an application from GDB prompt Date: Thu, 31 May 2012 14:20:54 +0100 Lines: 25 Message-ID: <87lik8ebbd.fsf@sapphire.mobileactivedefense.com> References: <8bb99d54-c1e4-4c96-9c48-d0cd3d6eeb50@6g2000vbv.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net 1aq+s149vbjbXxNmTl7mYQiRyhzS4uH+yv5ybyKCq9vGKw0ppILw96wdvyi8DY8FQ= Cancel-Lock: sha1:ES0RmlY3QgnRwqwh9o7tOsQ4Yis= sha1:88fECwDokYsP3Yir6dCxyFlNEAw= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Xref: csiph.com comp.os.linux.development.system:424 Hari Prasath writes: > I have an application that is to be debugged using GDB. So I can use > the standard gdb and enter into the gdb prompt and then > start my application,make it to crash and get the backtrace. > > But the problem is that the application to be debugged is driven by > another application which has to be started after this and from the > same shell session. So my problem is once I am at the gdb prompt, I > don't know how to start my other application(which is not needed to be > debugged) which driver the actual application to be debugged. > > Any thoughts how to get this done? - use a 2nd terminal window - log into a different VT - send gdb into the background with ^Z, start your application backgrounded, get back to gdb with 'fg' - start it via the gdb 'shell' command OTOH, a much better solution, especially since it also enables you to get information about uncontrolled crashes, use ulimit -c to ensure that you get a coredump despite your 'upstream distribution provider' has silently disabled that lest someone could expect him to fix the crashes in his software.