From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25552 invoked by alias); 9 Nov 2011 18:19:20 -0000 Received: (qmail 25530 invoked by uid 22791); 9 Nov 2011 18:19:19 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate2.uk.ibm.com (HELO mtagate2.uk.ibm.com) (194.196.100.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Nov 2011 18:18:55 +0000 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id pA9IIrfL026717 for ; Wed, 9 Nov 2011 18:18:53 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pA9IIrij2523194 for ; Wed, 9 Nov 2011 18:18:53 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pA9IIrCU005910 for ; Wed, 9 Nov 2011 11:18:53 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id pA9IIqDP005875; Wed, 9 Nov 2011 11:18:52 -0700 Message-Id: <201111091818.pA9IIqDP005875@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 09 Nov 2011 19:18:52 +0100 Subject: Re: [rfc][2/3] Remote core file generation: register notes To: pedro@codesourcery.com (Pedro Alves) Date: Wed, 09 Nov 2011 18:19:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <201111091605.12123.pedro@codesourcery.com> from "Pedro Alves" at Nov 09, 2011 04:05:11 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2011-11/txt/msg00243.txt.bz2 Pedro Alves wrote: > On Friday 21 October 2011 19:56:39, Ulrich Weigand wrote: > > > write_gcore_file today uses a target hook target_make_corefile_notes in > > order to generate the core file note section. Having this as a target > > hook is really inappropriate when we want to support remote core file > > generation; it should really be a gdbarch callback instead. > > > > Note that this is the same transition we had with *reading* core files; > > that was intially supported on native targets only, but is now usually > > supported for remote targets via gdbarch hooks. > > > > To avoid having to complete that transition in one go across all > > targets, the patch for now adds a gdbarch_make_corefile_notes routine > > in addition to target_make_corefile_notes. For architectures that > > do not yet provide a gdbarch_make_corefile_notes routine, common > > code will fall back on the target hook. > > > > The patch implements this routine for all Linux targets in linux-tdep.c, > > moving code from linux-nat.c there. Note that not even all Linux targets > > can be converted at this point, only those that already implement the > > gdbarch_core_regset_sections hook -- if we don't have that, we do not > > know the sizes of core file register sections, and have to fall back > > on using regset data types from native system headers. > > > > Therefore, I'm keeping a fall-back native-only implementation in > > linux-nat.c for now; to avoid duplication this uses a helper routine > > in linux-tdep.c for everything except the core register sets. > > > > Note that the previous BFD patch is a prerequiste; otherwise, we might > > get link failures due to unresolved symbols for cross GDB builds. > > This looks very good to me. Thanks for the review! Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com