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: [RFA 22/42] Move current_subfile to buildsym_compunit


> @@ -901,8 +902,10 @@ void
>  push_subfile ()
>  {
>    gdb_assert (buildsym_compunit != nullptr);
> -  gdb_assert (! (current_subfile == NULL || current_subfile->name == NULL));
> -  buildsym_compunit->m_subfile_stack.push_back (current_subfile->name);
> +  gdb_assert (! (buildsym_compunit->m_current_subfile == NULL
> +		 || buildsym_compunit->m_current_subfile->name == NULL));

Here, you might as well write two separate asserts.

  gdb_assert (buildsym_compunit->m_current_subfile != NULL);
  gdb_assert (buildsym_compunit->m_current_subfile->name != NULL);

Otherwise, LGTM.

Simon


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