[0/2] Remove 2 uses of VEC from gdb

Message ID cover.1569276387.git.andrew.burgess@embecosm.com
Headers show
Series
  • Remove 2 uses of VEC from gdb
Related show

Message

Andrew Burgess Sept. 23, 2019, 10:09 p.m.
Removes 2 uses of VEC from GDB.  I've taken a straight forward
approach to the replacement, trying as far as possible to do a like
for like replacement with minimal, or no refactoring.  As a result the
code isn't always the best C++ possible - specifically, I end up with
pointer to std::vector instead of a straight up std::vector.

I don't know if people would prefer a redesign of the code at the same
time, or if we're happy to just be rid of some more uses of VEC for
now, and leave any redesign for later (probably not me though).

Thanks,
Andrew

---

Andrew Burgess (2):
  gdb: Remove a VEC from gdbsupport/btrace-common.h
  gdb: Change a VEC to std::vector in btrace.{c,h}

 gdb/ChangeLog                  | 33 +++++++++++++++++
 gdb/btrace.c                   | 84 ++++++++++++++++++++----------------------
 gdb/btrace.h                   |  3 +-
 gdb/gdbserver/ChangeLog        |  5 +++
 gdb/gdbserver/linux-low.c      |  8 +---
 gdb/gdbsupport/btrace-common.c | 17 ++++-----
 gdb/gdbsupport/btrace-common.h | 20 +++++++---
 gdb/nat/linux-btrace.c         | 14 +++----
 8 files changed, 109 insertions(+), 75 deletions(-)

-- 
2.14.5

Comments

Tom Tromey Sept. 24, 2019, 7:54 p.m. | #1
>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:


Andrew> I don't know if people would prefer a redesign of the code at the same
Andrew> time, or if we're happy to just be rid of some more uses of VEC for
Andrew> now, and leave any redesign for later (probably not me though).

I think the approach you took is fine.

I looked at the patches but didn't have any comments that Simon didn't
already make.

thanks,
Tom