From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20478 invoked by alias); 1 Mar 2011 21:04:56 -0000 Received: (qmail 20470 invoked by uid 22791); 1 Mar 2011 21:04:55 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Mar 2011 21:04:50 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 6A87020003 for ; Tue, 1 Mar 2011 13:04:49 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id 619B7CD943 for ; Tue, 1 Mar 2011 13:04:49 -0800 (PST) Message-ID: <4D6D5F71.5040802@vmware.com> Date: Tue, 01 Mar 2011 21:04:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: [commit] py-prettyprint.c, val may be null Content-Type: multipart/mixed; boundary="------------090805090509080901070006" X-IsSubscribed: yes 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-03/txt/msg00045.txt.bz2 This is a multi-part message in MIME format. --------------090805090509080901070006 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 12 checked in --------------090805090509080901070006 Content-Type: text/plain; name="reversenull5.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="reversenull5.txt" Content-length: 856 2011-03-01 Michael Snyder * python/py-prettyprint.c (apply_val_pretty_printer): VAL may be null. Index: python/py-prettyprint.c =================================================================== RCS file: /cvs/src/src/gdb/python/py-prettyprint.c,v retrieving revision 1.21 diff -u -p -u -p -r1.21 py-prettyprint.c --- python/py-prettyprint.c 14 Feb 2011 11:10:53 -0000 1.21 +++ python/py-prettyprint.c 1 Mar 2011 21:02:05 -0000 @@ -692,7 +692,8 @@ apply_val_pretty_printer (struct type *t enum string_repr_result print_result; /* No pretty-printer support for unavailable values. */ - if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type))) + if (val && !value_bytes_available (val, embedded_offset, + TYPE_LENGTH (type))) return 0; cleanups = ensure_python_env (gdbarch, language); --------------090805090509080901070006--