Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Don't check PST is NULL in read_symtab
Date: Fri, 11 Jan 2013 04:52:00 -0000	[thread overview]
Message-ID: <20130111045233.GK6143@adacore.com> (raw)
In-Reply-To: <1357869440-23451-1-git-send-email-yao@codesourcery.com>

> 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


  reply	other threads:[~2013-01-11  4:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-11  1:57 Yao Qi
2013-01-11  4:52 ` Joel Brobecker [this message]
2013-01-11 14:34   ` Tom Tromey
2013-01-11 14:56     ` Yao Qi
2013-01-11 15:06       ` Tom Tromey
2013-01-14 12:42         ` [committed]: " Yao Qi
2013-01-14 12:44         ` Yao Qi
2013-01-11 14:46   ` Yao Qi
2013-01-11 15:06     ` Joel Brobecker
2013-01-11 18:02       ` Pedro Alves
2013-01-11 18:44         ` Joel Brobecker
2013-01-14 12:42           ` Yao Qi

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=20130111045233.GK6143@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.com \
    /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