From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7740 invoked by alias); 10 Sep 2012 19:08:31 -0000 Received: (qmail 7730 invoked by uid 22791); 10 Sep 2012 19:08:30 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BJ X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Sep 2012 19:08:14 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8AJ8DcP029828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Sep 2012 15:08:13 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8AJ8BYB015068 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 10 Sep 2012 15:08:12 -0400 From: Tom Tromey To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: RFC: printing pointers to global (data) variable on Windows... References: <20120816152255.GA2836@adacore.com> <87zk5umwj3.fsf@fleche.redhat.com> <20120816224524.GC2798@adacore.com> <87628hmwbr.fsf@fleche.redhat.com> <20120817231554.GF2798@adacore.com> <87r4r1h2u4.fsf@fleche.redhat.com> <20120821153627.GS2798@adacore.com> <20120905144406.GC2853@adacore.com> Date: Mon, 10 Sep 2012 19:08:00 -0000 In-Reply-To: <20120905144406.GC2853@adacore.com> (Joel Brobecker's message of "Wed, 5 Sep 2012 07:44:06 -0700") Message-ID: <87fw6pd7c4.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-09/txt/msg00134.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> * symtab.h (struct minimal_symbol) [has_size]: New field. Joel> (MSYMBOL_SIZE): Adjust to forbid macro from being used as lvalue. Joel> (SET_MSYMBOL_SIZE, MSYMBOL_HAS_SIZE): New macros. Joel> * printcmd.c (build_address_symbolic): Only filter out zero-sized Joel> minimal symbols if the symbol's size is actually known. Joel> * minsyms.c (prim_record_minimal_symbol_full): Adjust setting Joel> of msymbol's size field. Add comment. Joel> (install_minimal_symbols): Use SET_MSYMBOL_SIZE to set the Joel> minimal symbol size. Joel> * elfread.c (elf_symtab_read, elf_rel_plt_read): Use Joel> SET_MSYMBOL_SIZE to set the minimal symbol size. Joel> OK to commit? Joel> @@ -1233,7 +1235,7 @@ install_minimal_symbols (struct objfile *objfile) Joel> SYMBOL_VALUE_ADDRESS (&msymbols[mcount]) = 0; Joel> MSYMBOL_TARGET_FLAG_1 (&msymbols[mcount]) = 0; Joel> MSYMBOL_TARGET_FLAG_2 (&msymbols[mcount]) = 0; Joel> - MSYMBOL_SIZE (&msymbols[mcount]) = 0; Joel> + SET_MSYMBOL_SIZE (&msymbols[mcount], 0); I tend to think this hunk should not use SET_MSYMBOL_SIZE. Maybe it even ought to use memset instead of what it currently does. Or, if SET_MSYMBOL_SIZE is correct here, a comment would be helpful. The rest looked good to me. Tom