GDB debugging and printing Vector and Array

How vectorto print std :: vector type variables :

p *(vector._M_impl._M_start)@vector.size()

How values_to print std :: array type variables :

p *values_.data_.get()@values_.size()

When I first learned about gdb, I never found a way to print these two types of variables. As a C ++
little white, I also tried it for a long time. I hope to share it with you.

Published 10 original articles · won praise 0 · Views 6262

Guess you like

Origin blog.csdn.net/u010379248/article/details/101992178