Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Re: No longer accept NULL values in value_bits_valid and value_bits_synthetic_pointer
Date: Mon, 14 Feb 2011 11:58:00 -0000	[thread overview]
Message-ID: <201102141158.02189.pedro@codesourcery.com> (raw)
In-Reply-To: <201102141156.49457.pedro@codesourcery.com>

On Monday 14 February 2011 11:56:49, Pedro Alves wrote:
> Following up on
> <http://sourceware.org/ml/gdb-patches/2011-02/msg00201.html>.
> 
> I've checked in this patch.  We shouldn't be getting
> NULL values here anymore.  If I missed a case were we do, the
> offending caller needs to be fixed to not pass it.
> 
> Pedro Alves
> 
> 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
> 
>         * value.c (value_bits_valid, value_bits_synthetic_pointer):
>         No longer handle NULL values.

Sigh.

2011-02-14  Pedro Alves  <pedro@codesourcery.com>

	* value.c (value_bits_valid, value_bits_synthetic_pointer):
	No longer handle NULL values.

---
 gdb/value.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: src/gdb/value.c
===================================================================
--- src.orig/gdb/value.c	2011-02-11 15:53:44.717504003 +0000
+++ src/gdb/value.c	2011-02-11 15:53:51.457503999 +0000
@@ -998,7 +998,7 @@ value_entirely_optimized_out (const stru
 int
 value_bits_valid (const struct value *value, int offset, int length)
 {
-  if (value == NULL || !value->optimized_out)
+  if (!value->optimized_out)
     return 1;
   if (value->lval != lval_computed
       || !value->location.computed.funcs->check_validity)
@@ -1011,7 +1011,7 @@ int
 value_bits_synthetic_pointer (const struct value *value,
 			      int offset, int length)
 {
-  if (value == NULL || value->lval != lval_computed
+  if (value->lval != lval_computed
       || !value->location.computed.funcs->check_synthetic_pointer)
     return 0;
   return value->location.computed.funcs->check_synthetic_pointer (value,


  reply	other threads:[~2011-02-14 11:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 11:56 Pedro Alves
2011-02-14 11:58 ` Pedro Alves [this message]
2011-02-14 15:17   ` Mark Kettenis
2011-02-14 15:29     ` Pedro Alves
2011-02-14 16:00       ` Mark Kettenis

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=201102141158.02189.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /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