This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/5] dwarf2read.c: Some C++fycation


While working on:
  https://sourceware.org/ml/gdb-patches/2017-03/msg00444.html
after looking at:
  https://sourceware.org/ml/gdb-patches/2017-03/msg00427.html

I noticed several things in gdb/dwarf2read.c that could be cleaned up.
This is the result.

This also serves as an earlier justification for adding several bits
that I'd like for another (larger) series I'm working on (e.g., the
gdb::optional changes).  :-)

Tested on x86_64 Fedora 23.

Pedro Alves (5):
  dwarf2read.c: Some C++fycation, use std::vector, std::unique_ptr
  gdb::optional: Add observers
  dwarf2read.c: Make dir_index and file_name_index strong typedefs
  Make sect_offset and cu_offset strong typedefs instead of structs
  dwarf2read.c: C++fy lnp_state_machine

 gdb/Makefile.in                       |    6 +-
 gdb/common/gdb_optional.h             |   29 +
 gdb/common/offset-type.h              |  149 ++++
 gdb/common/preprocessor.h             |   31 +
 gdb/common/traits.h                   |   34 +
 gdb/common/underlying.h               |   32 +
 gdb/common/valid-expr.h               |  108 +++
 gdb/dwarf2expr.c                      |   45 +-
 gdb/dwarf2expr.h                      |   16 +-
 gdb/dwarf2loc.c                       |   37 +-
 gdb/dwarf2read.c                      | 1494 +++++++++++++++++----------------
 gdb/gdbtypes.h                        |   14 +-
 gdb/unittests/offset-type-selftests.c |  178 ++++
 13 files changed, 1369 insertions(+), 804 deletions(-)
 create mode 100644 gdb/common/offset-type.h
 create mode 100644 gdb/common/preprocessor.h
 create mode 100644 gdb/common/traits.h
 create mode 100644 gdb/common/underlying.h
 create mode 100644 gdb/common/valid-expr.h
 create mode 100644 gdb/unittests/offset-type-selftests.c

-- 
2.5.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]