This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: printing pointers to global (data) variable on Windows...
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 10 Sep 2012 13:08:11 -0600
- 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>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> 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