From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7591 invoked by alias); 24 Feb 2007 16:15:21 -0000 Received: (qmail 7572 invoked by uid 22791); 24 Feb 2007 16:15:21 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sat, 24 Feb 2007 16:15:15 +0000 Received: from dsl093-172-095.pit1.dsl.speakeasy.net ([66.93.172.95] helo=caradoc.them.org) by nevyn.them.org with esmtp (Exim 4.63) (envelope-from ) id 1HKzYE-0003Eo-13; Sat, 24 Feb 2007 11:15:10 -0500 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HKzYD-0007AT-Kd; Sat, 24 Feb 2007 11:15:09 -0500 Date: Sat, 24 Feb 2007 20:46:00 -0000 From: Daniel Jacobowitz To: Francesco Bradascio Cc: gdb@sourceware.org Subject: Re: gdbserver unable to attach to process Message-ID: <20070224161509.GB27534@caradoc.them.org> Mail-Followup-To: Francesco Bradascio , gdb@sourceware.org References: <45E05F1A.9020907@yahoo.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45E05F1A.9020907@yahoo.it> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes 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: 2007-02/txt/msg00257.txt.bz2 On Sat, Feb 24, 2007 at 04:51:54PM +0100, Francesco Bradascio wrote: > Hello, > I developing an application for mobilinux (kernel 2.6.10) on ARM V6 > platform and I need to debug it , however, the gdbserver remote debugger > agent is unable to attach to any executable... here's what happens: > > First I tried to execute gdbserver (on remote platform - IP: > 192.168.16.2) as follow: > > $gdbserver :12345 /usr/local/bin/flP5 > Process /usr/local/bin/flP5 created; pid = 4630 > > at this point my application (flP5) starts without stopping at first > instruction (as should be) and only after I kill the process 4630, > gdbserver shows the "Listening on port 12345" prompt, furthermore, when > I do "target remote 192.168.16.2:12345" from my host's gdb I get a > "Connection refused" message and the remote gdbserver exits. This sounds like something is wrong with your environment, not with gdbserver - I would be suspicious of a kernel bug of some sort. Or, perhaps, is the application set-user-ID? That would also explain this: > $ /usr/local/bin/flP5 & > [1] 4718 > $ gdbserver :12345 --attach 4718 > Cannot attach to process 4718: Operation not permitted (1) -- Daniel Jacobowitz CodeSourcery