[RFA] Change machoread.c to use std::vector

Simon Marchi simark@simark.ca
Sat Mar 17 17:28:00 GMT 2018


On 2018-03-17 11:46 AM, Tom Tromey wrote:
> This changes machoread.c to use std::vector rather than VEC.  This
> allows removing some cleanups.
> 
> Regression tested by the buildbot, though I don't think anything
> actually tests macho reading.

I suppose running the testsuite on macOS would test it?  Though I'm not
sure the current state of macOS support allows that...

I noted one comment below.

> @@ -654,9 +639,9 @@ macho_symfile_read_all_oso (VEC (oso_el) **oso_vector_ptr,
>  	  std::string archive_name (oso->name, pfx_len);
>  
>            /* Compute number of oso for this archive.  */
> -          for (last_ix = ix;
> -               VEC_iterate (oso_el, vec, last_ix, oso2); last_ix++)
> +          for (last_ix = ix; ix < oso_vector_ptr->size (); last_ix++)

"ix < " or "last_ix < "?

Simon



More information about the Gdb-patches mailing list