From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21850 invoked by alias); 16 Sep 2008 10:23:59 -0000 Received: (qmail 21842 invoked by uid 22791); 16 Sep 2008 10:23:59 -0000 X-Spam-Check-By: sourceware.org Received: from mail4.nsc.com (HELO sc-mailgw02.nsc.com) (12.151.32.19) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 16 Sep 2008 10:23:20 +0000 X-WSS-ID: 0K7AA6Q-0A-046-01 Received: from SCNTRDCSS8.nsc.com (unknown [192.168.7.27]) by sc-mailgw02.nsc.com (Tumbleweed MailGate 3.5.1) with ESMTP id 2620C1B32886 for ; Tue, 16 Sep 2008 03:23:14 -0700 (PDT) Received: from [10.188.132.130] by SCNTRDCSS6.nsc.com with ESMTP (-Hi-); Tue, 16 Sep 2008 03:23:07 -0700 X-Server-Uuid: CDE0D3F6-4EC6-4DC9-81EF-DBBF12AF9A3C Received: from [139.187.78.152] by scmh1.nsc.com with ESMTP; Tue, 16 Sep 2008 03:23:06 -0700 Message-ID: <48CF8938.4030208@nsc.com> Date: Tue, 16 Sep 2008 10:23:00 -0000 From: "M R Swami Reddy" User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "ranjith kumar" cc: gdb@sourceware.org Subject: Re: executing shell commands at gdb prompt References: <31cff80d0809160318m7d6df1dbr89979d4f18c3a77f@mail.gmail.com> In-Reply-To: <31cff80d0809160318m7d6df1dbr89979d4f18c3a77f@mail.gmail.com> X-WSS-ID: 64D157711CC1920681-02-01 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00095.txt.bz2 ranjith kumar wrote: > Hi, > I am new to gdb. > I want to know is there any way to execute shell commands (like ls, ps > .......) at gdb command prompt?? > > Suppose if I want to know list of files in current directory while > running "gdb", I have to open another shell to know it. Without > opening it, is it possible to execute "ls " command at gdb command > prompt?? Yes, you can do it. See below "shell command" in gdb prompt. == (gdb) help shell Execute the rest of the line as a shell command. With no arguments, run an inferior shell. (gdb) shell ls == Best Regards Swami