From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7793 invoked by alias); 10 Apr 2008 14:02:44 -0000 Received: (qmail 7713 invoked by uid 22791); 10 Apr 2008 14:02:42 -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; Thu, 10 Apr 2008 14:02:23 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6784D980F7; Thu, 10 Apr 2008 14:02:21 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 3BDA898060; Thu, 10 Apr 2008 14:02:21 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JjxM4-0005oA-Hg; Thu, 10 Apr 2008 10:02:20 -0400 Date: Thu, 10 Apr 2008 15:16:00 -0000 From: Daniel Jacobowitz To: Aleksandar Ristovski Cc: gdb-patches@sourceware.org Subject: Re: [patch] core: use core_pid Message-ID: <20080410140220.GA21662@caradoc.them.org> Mail-Followup-To: Aleksandar Ristovski , gdb-patches@sourceware.org References: <47C46A96.9060105@qnx.com> <20080226194502.GA1523@caradoc.them.org> <47C46E0F.2040309@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47C46E0F.2040309@qnx.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00189.txt.bz2 On Tue, Feb 26, 2008 at 02:52:47PM -0500, Aleksandar Ristovski wrote: > Daniel Jacobowitz wrote: >> On Tue, Feb 26, 2008 at 02:37:58PM -0500, Aleksandar Ristovski wrote: >>> + gdb_assert (abfd != NULL && elf_tdata (abfd) != NULL); >> >> What if it's not an ELF core file? >> > Didn't think about that (our core can only be ELF). > > In that case, do you think something like this would work? Not quite. I recommend you take a look at bfd/elf.c and bfd/elf64-x86-64.c to see some different ways ".reg/XXXX" sections are created. For QNX, you get .reg/TID. But for other targets you get (LWPID << 16) + PID and core_pid is updated as we go along. It looks like the information GDB needs doesn't make it out of BFD. -- Daniel Jacobowitz CodeSourcery