This is the mail archive of the
mailing list for the Archer project.
Re: Stack trace from core file without executable
- From: "Paul Pluzhnikov" <ppluzhnikov at google dot com>
- To: "Ray Ruvinskiy" <rruvinsk at sybase dot com>
- Cc: archer at sourceware dot org
- Date: Sat, 18 Oct 2008 15:19:00 -0700
- Subject: Re: Stack trace from core file without executable
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;t=1224368343; bh=qY9t7W5mHP/21aEx2+LxBB8TKzk=;h=DomainKey-Signature:Message-ID:Date:From:To:Subject:Cc: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-Disposition:References; b=SkmQum3nVxInCFJew9HcJkaJtseatloAOwxLE/GVgKO0vNxQB9OTj3CxLcBfMWmOfCJjWE45uf5IsYb0tGU2fA==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns;h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;b=phP8IAXHh4We8FlOUAMi/DaUgl1AmtIAQ+t+T65l+sGjkkrhVG2J3eySSc+hOkRtBtv1TDgIYCbnvUQjlk5GmQ==
- References: <84F62FF9-ED8B-40D3-9C2C-384E59DE955F@sybase.com>
On Sat, Oct 18, 2008 at 2:57 PM, Ray Ruvinskiy <email@example.com> wrote:
> frysk's fstack had a feature that I found quite useful: the ability to
> extract (fairly accurate) stack traces from core files without needing the
> executable that generated them.
On which platform? And what is contained in the frysk stack trace?
AFAIU, it couldn't contain function names, as these aren't normally
saved in the 'core' at all.
Assuming frysk stack trace looks like a chain of program counters,
what do you use it for? You still need the original executable to
tell you what these addresses are (at which point you could just
analyze the core with the executable in gdb, and get complete
> gdb, on the other hand, does not appear to
> be able to do this very well. (Running a simple executable that does nothing
> but call abort() and then attempting to get the stack trace from the
> resulting core file using fstack and gdb demonstrates this fairly well.)
> I was wondering what accounts for fstack's ability (or gdb's lack of
> ability) to do this, and how feasible it would be to migrate this
> functionality to archer or gdb.
In general, on x86_64 and ia64, for code compiled with any level of
optimization (and without -fno-omit-frame-pointer) 'core' does not
have enough info to obtain a stack trace -- you need unwind
descriptors which are present in the executable.
But on x86, SPARC and PPC, gdb probably could do much better.
Still, I don't understand what you would do with that info.