From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7423 invoked by alias); 24 Feb 2009 00:59:56 -0000 Received: (qmail 7415 invoked by uid 22791); 24 Feb 2009 00:59:55 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_05,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org Received: from mail-ew0-f180.google.com (HELO mail-ew0-f180.google.com) (209.85.219.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Feb 2009 00:59:51 +0000 Received: by ewy28 with SMTP id 28so159411ewy.0 for ; Mon, 23 Feb 2009 16:59:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.210.90.20 with SMTP id n20mr3893647ebb.162.1235437188347; Mon, 23 Feb 2009 16:59:48 -0800 (PST) Date: Tue, 24 Feb 2009 00:59:00 -0000 Message-ID: Subject: problem remote debugging From: Brendan Miller To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2009-02/txt/msg00146.txt.bz2 I'm having a problem with remote debugging where when debugging locally I will launch fine, but when remotely debugging my program will fail to open a certain text file, then segfault. Both the host and client are running x86 RHEL4. The gdb version is 6.3.0.0-1.153.el4rh. In the example below, I am trying to remote debug a fairly complicated service that has it's own user "a_user". On the remote machine I start gdbserver with: sudo -u a_user gdbserver host:4000 my_binary On the local machine I run: gdb my_binary Then within gdb I type: target remote my_remote_machine:4000 run Then I get the "failed to open file error" followed by a segfault. On the other hand if I run this on the remote machine: sudo -u a_user gdb my_binary run everything is fine. Is one of my steps for remote debugging wrong? Would permissions be different under remote debugging for some reason, and that would explain why I can't open that file under remote debugging? The service I"m trying to debug is heavily multithreaded, if that makes a difference.