Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: davem@davemloft.net
Cc: uweigand@de.ibm.com, gdb-patches@sourceware.org
Subject: Re: [committed] Fix gcore crashes on s390
Date: Sat, 06 May 2006 08:26:00 -0000	[thread overview]
Message-ID: <200605060825.k468P3BX023503@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20060505.183205.74231759.davem@davemloft.net>

> Date: Fri, 05 May 2006 18:32:05 -0700 (PDT)
> From: "David S. Miller" <davem@davemloft.net>
> 
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
> 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


  parent reply	other threads:[~2006-05-06  8:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-06  1:18 Ulrich Weigand
2006-05-06  1:35 ` David S. Miller
2006-05-06  1:56   ` Daniel Jacobowitz
2006-05-06  6:30     ` David S. Miller
2006-05-06 15:16       ` Daniel Jacobowitz
2006-05-06  8:31     ` Mark Kettenis
2006-05-06  8:26   ` Mark Kettenis [this message]
2006-05-06 15:19     ` Daniel Jacobowitz
2006-05-06 18:29       ` Mark Kettenis
2006-05-06 23:56         ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605060825.k468P3BX023503@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=davem@davemloft.net \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox