On 30/08/2024 10:12, David Malcolm wrote:
> On Fri, 2024-08-30 at 12:08 +0100, Alex Coplan wrote:
> > Hi,
> > 
> > As it stands, the pretty printing of GCC's vecs by gdbhooks.py only
> > handles vectors with vl_embed layout.  As such, when encountering a
> > vec
> > with vl_ptr layout, GDB would print a diagnostic like:
> > 
> >   gdb.error: There is no member or method named m_vecpfx.
> > 
> > when (e.g.) any such vec occurred in a backtrace.  This patch extends
> > VecPrinter.children to also handle vl_ptr vectors.
> > 
> > Manually tested by verifying that vl_embed vectors still print
> > correctly
> > and empty vl_ptr vectors no longer trigger errors.
> > 
> > OK for trunk? 
> 
> Thanks for fixing this.
> 
> +    else:
> +        assert False, f"unxpected vec kind {kind}"
> 
> Typo: "unxpected" -> "unexpected"
> 
> Otherwise, looks good for trunk (with a ChangeLog).

Thanks for the review, I've pushed this to trunk with the typo fixed and
a suitable ChangeLog (as g:5020f8ea80af90d8a08eff9fdef3276056df98f5).

Not entirely sure what happened to the ChangeLog as I remember writing
one, but it seems I must have lost it somewhere along the way.  Sorry
about that!

FYI there will likely be at least one follow-on patch as I found another
case where this code trips over on references to vec*.

Thanks,
Alex

> 
> Thanks again
> Dave
> 

Reply via email to