From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 877 invoked by alias); 6 May 2006 08:26:02 -0000 Received: (qmail 864 invoked by uid 22791); 6 May 2006 08:26:00 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 06 May 2006 08:25:56 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k468P4gr029669; Sat, 6 May 2006 10:25:04 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k468P3OS029426; Sat, 6 May 2006 10:25:03 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k468P3BX023503; Sat, 6 May 2006 10:25:03 +0200 (CEST) Date: Sat, 06 May 2006 08:26:00 -0000 Message-Id: <200605060825.k468P3BX023503@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: davem@davemloft.net CC: uweigand@de.ibm.com, gdb-patches@sourceware.org In-reply-to: <20060505.183205.74231759.davem@davemloft.net> Subject: Re: [committed] Fix gcore crashes on s390 References: <200605060118.k461IpKO009920@d12av02.megacenter.de.ibm.com> <20060505.183205.74231759.davem@davemloft.net> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00142.txt.bz2 > Date: Fri, 05 May 2006 18:32:05 -0700 (PDT) > From: "David S. Miller" > > From: "Ulrich Weigand" > Date: Sat, 6 May 2006 03:18:51 +0200 (CEST) > > > since the switch of gcore to use regset_from_core_section, it > > crashes on s390, because the regsets we're providing have a > > NULL collect_regset function. Fixed by the patch below. > > > > Tested on s390-ibm-linux and s390x-ibm-linux. > > Committed to mainline. > > Thanks for catching and fixing this. > > Hmmm... is this a common omission? Yes, targets are allowed to not implement the collect_regset functions if they only implement reading core dumps and don't need it for something else (like writing core dumps with gcore or fiddling with threads). All Linux targets now fall in the second category, but some probably think they fall in the first. So either we should: 1. Deal gracefully with the collect_regset function pointer being NULL. 2. Put in a gdb_assert() to check it's not null before it's used. I'm thinking that we should try option #2 for a while to get people to implement the functions for the other Linux targets too, just like Ulrich did for s390. Mark