From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28831 invoked by alias); 30 Jun 2009 20:54:34 -0000 Received: (qmail 28822 invoked by uid 22791); 30 Jun 2009 20:54:33 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Jun 2009 20:54:25 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MLkLO-0007GD-Ad for gdb@sources.redhat.com; Tue, 30 Jun 2009 20:54:22 +0000 Received: from 74.125.57.33 ([74.125.57.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Jun 2009 20:54:22 +0000 Received: from taviso by 74.125.57.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Jun 2009 20:54:22 +0000 To: gdb@sources.redhat.com From: Tavis Ormandy Subject: Re: importing symbols from unsupported BFD target Date: Tue, 30 Jun 2009 20:54:00 -0000 Message-ID: References: <20090630171747.GA31917@caradoc.them.org> Content-Type: text/plain; charset=us-ascii User-Agent: Gemini/2.29i (Qt/3.3.6) (Linux-i686) 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-06/txt/msg00331.txt.bz2 Daniel Jacobowitz wrote: > On Tue, Jun 30, 2009 at 06:59:06PM +0200, Tavis Ormandy wrote: > > This basically works, `info address symname`, `b symname`, `x/i symname` > > all work, but `info symbol address` fails, and stacktraces, info > > breakpoints, etc, etc are not symbolised. > > > > Can anyone suggest what I might be missing? > > I think you're going to have to create sections in the file; this sounds > like it's going to be specific to ABS symbols. A NOBITS (bss) section is > probably fine though it may need to be marked executable too. > Ahh, you were absolutely right :-) It took some massaging to convince ld to create the output I wanted, but it does appear to have worked, and I can now do basic remote debugging of the windows kernel using gdb. And the backtrace is now symbolised correctly: Breakpoint 23, 0x805c517d in PsImpersonateClient () (gdb) bt #0 0x805c517d in PsImpersonateClient () #1 0x805ece9b in SeImpersonateClientEx () #2 0x8059a68a in NtImpersonateClientOfPort () #3 0xee392c01 in ?? () ... Which looks exactly right. Really pleased I can work on this from within gdb. Thanks, Tavis. -- ------------------------------------- taviso@sdf.lonestar.org | finger me for my pgp key. -------------------------------------------------------