[0/3] C++ification of symfile_segment_data

Message ID 20200519013533.1428830-1-simon.marchi@efficios.com
Headers show
Series
  • C++ification of symfile_segment_data
Related show

Message

Kevin Buettner via Gdb-patches May 19, 2020, 1:35 a.m.
As I was reading this code, I did this simple translation from manual
memory management to using C++ constructs.

Simon Marchi (3):
  gdb: allocate symfile_segment_data with new
  gdb: use std::vector to store segments in symfile_segment_data
  gdb: make symfile_segment_data::segment_info an std::vector

 gdb/elfread.c       | 17 ++++++-----------
 gdb/remote.c        | 22 ++++++++++------------
 gdb/solib-target.c  | 18 ++++++++----------
 gdb/symfile-debug.c |  2 +-
 gdb/symfile.c       | 45 ++++++++++++++-------------------------------
 gdb/symfile.h       | 41 +++++++++++++++++++++++------------------
 6 files changed, 62 insertions(+), 83 deletions(-)

-- 
2.26.2

Comments

Tom Tromey May 19, 2020, 2:57 p.m. | #1
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:


Simon> As I was reading this code, I did this simple translation from manual
Simon> memory management to using C++ constructs.

I sent one nit, but this all looks good to me.

Tom
Simon Marchi May 19, 2020, 4:25 p.m. | #2
On 2020-05-19 10:57 a.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

> 

> Simon> As I was reading this code, I did this simple translation from manual

> Simon> memory management to using C++ constructs.

> 

> I sent one nit, but this all looks good to me.

> 

> Tom

> 


I pushed it after adding the "reserve" in the second patch.  Thanks!

Simon