From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14162 invoked by alias); 11 Oct 2003 22:43:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14154 invoked from network); 11 Oct 2003 22:43:16 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 11 Oct 2003 22:43:16 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id h9BMgi4x000485; Sun, 12 Oct 2003 00:42:44 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id h9BMgiGj010473; Sun, 12 Oct 2003 00:42:44 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id h9BMgiMI010470; Sun, 12 Oct 2003 00:42:44 +0200 (CEST) Date: Sat, 11 Oct 2003 22:43:00 -0000 Message-Id: <200310112242.h9BMgiMI010470@elgar.kettenis.dyndns.org> From: Mark Kettenis To: drow@mvista.com CC: gdb@sources.redhat.com In-reply-to: <20031011222622.GB7209@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 11 Oct 2003 18:26:22 -0400) Subject: Re: [RFC] Core files and the architecture vector References: <200310112207.h9BM7WW0010332@elgar.kettenis.dyndns.org> <20031011222622.GB7209@nevyn.them.org> X-SW-Source: 2003-10/txt/msg00187.txt.bz2 Date: Sat, 11 Oct 2003 18:26:22 -0400 From: Daniel Jacobowitz I'll respond to the rest of your message later but... On Sun, Oct 12, 2003 at 12:07:32AM +0200, Mark Kettenis wrote: > Let me elaborate on the second point. When a 32-bit executable > running on FreeBSD/amd64 or GNU/Linux x86-64 dumps, it produces an > 64-bit ELF core file. To be able to make any sense out of this core > file, we'll need the 64-bit register set definitions that are provided > by the regset_from_core_section method from the 64-bit architecture I still don't think this bit makes much sense. The process sees only 32-bit registers; the core should contain only 32-bit registers. Well, it's not for me to decide what how the various OSes dump core :-(. Anyway even for 32-bit only stuff the core file architecture and executable architecture might differ. When running a GNU/Linux i386 binary on FreeBSD/i386, it produces a FreeBSD/i386 corefile. Do we see 32-bit or 64-bit registers from ptrace when debugging such a process? At least on FreeBSD/amd64 you see the 64-bit register with ptrace. Mark