From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17772 invoked by alias); 16 Oct 2007 11:43:17 -0000 Received: (qmail 17764 invoked by uid 22791); 16 Oct 2007 11:43:16 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 16 Oct 2007 11:43:14 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 4879B98336; Tue, 16 Oct 2007 11:43:12 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 24DBB98100; Tue, 16 Oct 2007 11:43:12 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IhkpK-0007le-4A; Tue, 16 Oct 2007 07:43:10 -0400 Date: Tue, 16 Oct 2007 11:43:00 -0000 From: Daniel Jacobowitz To: Rene Limberger Cc: gdb@sourceware.org Subject: Re: implementation of backtrace on OSX? Message-ID: <20071016114309.GA29578@caradoc.them.org> Mail-Followup-To: Rene Limberger , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) 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-10/txt/msg00116.txt.bz2 On Mon, Oct 15, 2007 at 09:39:48PM -0700, Rene Limberger wrote: > hi, > > can anyone give me some pointers to where in the source code the gdb backtrace > is generated? ion linux, there is backtrace() via execinfo.h, unfortunately > this is not available on OSX and i would like to take a peak at how gdb > implements what we get when we type "bt". so for example: We can't help you with GDB on OS X; Apple's got their own version. FSF GDB doesn't support OS X. > i am specifically interested in how gdb resolves the file and line number from > the debug info. It maintains a complete symbol table, so there's no small piece of code I can point you to. The easiest way to do this is to use binutils's addr2line utility. -- Daniel Jacobowitz CodeSourcery