This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't check PST is NULL in read_symtab


> The "method" read_symtab of 'struct partial_symtab" is called in this
> way,
> 
>   (*pst->read_symtab) (objfile, pst);
> 
> so argument PST can't be NULL.

I confirmed it using a quick grep.

> I'll re-indent dwarf2_psymtab_to_symtab when check this patch in.

FWIW, you can also do the re-indent, and then post two parallel
patches: One is the actual patch, the second is a sub-part of
the actual patch where whitespace differences are ignored.
That's usually how I verify that my reformatting did not cause
any intentional changes...

> 2013-01-11  Yao Qi  <yao@codesourcery.com>
> 
> 	* dbxread.c (dbx_psymtab_to_symtab_1): Don't check PST is NULL.
> 	* dwarf2read.c (dwarf2_psymtab_to_symtab): Likewise.
> 	* mdebugread.c (mdebug_psymtab_to_symtab): Likewise.
> 	* xcoffread.c (xcoff_psymtab_to_symtab_1): Likewise.

If PST must not be NULL, I think that it should be documented in
psympriv.h. I am also wondering whether an assertion would be
useful or not; maybe not, just thinking out loud.

Tom and Doug are more involved in this area, so they'll probably
have a more definitive answer.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]