From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31628 invoked by alias); 19 Jan 2016 16:41:10 -0000 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 Received: (qmail 31605 invoked by uid 89); 19 Jan 2016 16:41:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1564, H*Ad:D*freebsd.org, emails X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qk0-f177.google.com Received: from mail-qk0-f177.google.com (HELO mail-qk0-f177.google.com) (209.85.220.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 19 Jan 2016 16:41:07 +0000 Received: by mail-qk0-f177.google.com with SMTP id s5so43332262qkd.0; Tue, 19 Jan 2016 08:41:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=d3jshVi0T8nROqBuwGTMYvDyG16H2S6l0h0l/a1ufi8=; b=i9LoKUWkuL1JW8KU+kYZLhcjSMoZKhcXV6T47Fm29d3dUajLRpBb7OeNjhGy7JV/GX F+N/TpJgajIxNI/leIY1XcNzm5dsiZ0ZLx7Ji6AEebmM9sejSEOWBm743qEniorlGnOF BH081JIkeMY+UzQwpmCsQ/oMT6ujO8zqWcLX6p+oTfA8c5Wi9mfAbRvzSWP/qgArMPWx glEezxMWiQ55UGqQLg7feGfPbcZEChPdLCxD1CuSauDeQeU/14MVfTjbY+F2uDdEEN2R 6MycZC6MAPHCttpAjbbOll2+pnVRmxjkc8dAl1V5tAOM95/KGYCDVCHqe5cWy7NKnfIc qAew== X-Gm-Message-State: ALoCoQmtOsP6lmpDcU+/jn1NXivgLQCK5mS8KgIZvYCvwBqwaveKwYpPQjkGjrV1cPagWBAh1BLKH/4KT2atGhDSaQMlYc1LSg== MIME-Version: 1.0 X-Received: by 10.55.80.131 with SMTP id e125mr39015681qkb.62.1453221665727; Tue, 19 Jan 2016 08:41:05 -0800 (PST) Received: by 10.55.215.6 with HTTP; Tue, 19 Jan 2016 08:41:05 -0800 (PST) In-Reply-To: <20160119031407.GD17028@bubble.grove.modra.org> References: <1736699.V7zq9VJIrx@ralph.baldwin.cx> <20160119001819.GB17028@bubble.grove.modra.org> <20160119031407.GD17028@bubble.grove.modra.org> Date: Tue, 19 Jan 2016 16:41:00 -0000 Message-ID: Subject: Re: Are ppc*_elf_write_core_note Os-specific? From: "H.J. Lu" To: Alan Modra Cc: John Baldwin , Ulrich Weigand , Binutils , GDB Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2016-01/txt/msg00031.txt.bz2 On Mon, Jan 18, 2016 at 7:14 PM, Alan Modra wrote: > On Tue, Jan 19, 2016 at 10:48:19AM +1030, Alan Modra wrote: >> PowerPC64 glibc even now doesn't defing prstatus32_t. :-( It seems >> only sparc and s390 do so. So PowerPC would need a >> hosts/powerpc-linux.h to define them for Linux, with some configury >> changes, like hosts/x86-64linux.h does for x86-64 Linux. I'll see >> about making those changes. >> >> Note that elf_backend_write_core_note is defined for x86-64, arm and >> aarch64 too. The ARM and AARCH64 functions look to be completely >> redundant, and I suspect all of them could disappear if we modify the >> generic code to handle prstatusx32_t for x86-64. > > Actually, there is a reason for the ARM and AARCH64 functions. > See https://sourceware.org/ml/binutils/2011-10/msg00202.html > Note the followup emails too.. > > So it seems that with the current infrastructure we can either support > core file generation on remote (linux) targets, or core file > generation on more native targets (freebsd). Alternatively, we'd > need to use separate bfd target vectors for linux and freebsd, which > can and will cause multiple target matches. > > Do we really want non-native core file generation? > Any changes shouldn't introduce regressions. I don't see why elf_backend_write_core_note can't handle all targets BFD supports since note_type is unique to each OS. BFD just needs to provide proper types independent of host header files, similar to hosts/x86-64linux.h. -- H.J.