From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12706 invoked by alias); 26 Dec 2008 10:40:37 -0000 Received: (qmail 12692 invoked by uid 22791); 26 Dec 2008 10:40:36 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Dec 2008 10:40:01 +0000 Received: by wf-out-1314.google.com with SMTP id 28so3693347wfc.24 for ; Fri, 26 Dec 2008 02:39:59 -0800 (PST) Received: by 10.142.245.6 with SMTP id s6mr4368188wfh.213.1230287999126; Fri, 26 Dec 2008 02:39:59 -0800 (PST) Received: by 10.143.155.16 with HTTP; Fri, 26 Dec 2008 02:39:59 -0800 (PST) Message-ID: <74fef6df0812260239o1f21e833t6464c9d41bedcdd1@mail.gmail.com> Date: Fri, 26 Dec 2008 10:40:00 -0000 From: "Mathieu Lacage" To: "Mathieu Lacage" , gdb@sourceware.org Subject: Re: how to make gdb happy with my linkmap In-Reply-To: <20081218221005.GA9012@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <74fef6df0812181341x8ecdd31me028bd4d658384b1@mail.gmail.com> <20081218214854.GA7706@caradoc.them.org> <74fef6df0812181402n1debced5xbe3f402a3a34ecf2@mail.gmail.com> <20081218221005.GA9012@caradoc.them.org> 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: 2008-12/txt/msg00088.txt.bz2 On Thu, Dec 18, 2008 at 11:10 PM, Daniel Jacobowitz wrote: > Oh! Sorry. Then I was off on a tangent. The salient difference is > whether your loader is started by the kernel based on a PT_INTERP > entry in the executable, or from the command line. If it's started > by PT_INTERP, things are much easier to handle. > > The only things I can think of are having the main application first, > and having the debug function be named _dl_debug_state (because we set > a breakpoint before _r_debug is initialized). There's not much more > to it. Ok, it appears that this is, indeed, sufficient to get good debugging when running the executable from a PT_INTERP. However, as you mentioned above, running the executable from the command-line without an associated PT_INTERP entry seems to confuse gdb quite a bit: it seems unable to place or handle breakpoints. Is there something I could do to help alleviate this problem (I would be happy to do whatever is needed in gdb proper) ? Maybe I could go and hack the on-stack aux vectors to help gdb ? regards, Mathieu -- Mathieu Lacage