[04/20] dwarf-reader split: create abg-symtab-reader.{h, cc} and test case
Commit Message
abg-symtab-reader.{h,cc} shall contain the refactored symtab reader.
Create the stub files, an empty unit test and hook everything up in the
make system.
* src/abg-symtab-reader.h: New header file.
* src/abg-symtab-reader.cc: New source file.
* src/Makefile.am: Add new source files.
* tests/Makefile.am: Add new test case runtestsymtabreader.
* tests/test-symtab-reader.cc: New test source file.
Reviewed-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
---
src/Makefile.am | 2 ++
src/abg-symtab-reader.cc | 21 +++++++++++++++++++++
src/abg-symtab-reader.h | 24 ++++++++++++++++++++++++
tests/Makefile.am | 4 ++++
tests/test-symtab-reader.cc | 15 +++++++++++++++
5 files changed, 66 insertions(+)
create mode 100644 src/abg-symtab-reader.cc
create mode 100644 src/abg-symtab-reader.h
create mode 100644 tests/test-symtab-reader.cc
Comments
Matthias Maennich <maennich@google.com> a écrit:
> abg-symtab-reader.{h,cc} shall contain the refactored symtab reader.
> Create the stub files, an empty unit test and hook everything up in the
> make system.
>
> * src/abg-symtab-reader.h: New header file.
> * src/abg-symtab-reader.cc: New source file.
> * src/Makefile.am: Add new source files.
> * tests/Makefile.am: Add new test case runtestsymtabreader.
> * tests/test-symtab-reader.cc: New test source file.
>
> Reviewed-by: Giuliano Procida <gprocida@google.com>
> Signed-off-by: Matthias Maennich <maennich@google.com>
Applied to master, thanks!
[...]
Cheers,
@@ -38,6 +38,8 @@ abg-tools-utils.cc \
abg-elf-helpers.h \
abg-elf-helpers.cc \
abg-regex.cc \
+abg-symtab-reader.h \
+abg-symtab-reader.cc \
$(VIZ_SOURCES)
libabigail_la_LIBADD = $(DEPS_LIBS)
new file mode 100644
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+// -*- Mode: C++ -*-
+//
+// Copyright (C) 2020 Google, Inc.
+//
+// Author: Matthias Maennich
+
+/// @file
+///
+/// This contains the definition of the symtab reader
+
+#include "abg-symtab-reader.h"
+
+namespace abigail
+{
+
+namespace symtab_reader
+{
+
+} // end namespace symtab_reader
+} // end namespace abigail
new file mode 100644
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+// -*- Mode: C++ -*-
+//
+// Copyright (C) 2020 Google, Inc.
+//
+// Author: Matthias Maennich
+
+/// @file
+///
+/// This contains the declarations for the symtab reader.
+
+#ifndef __ABG_SYMTAB_READER_H__
+#define __ABG_SYMTAB_READER_H__
+
+namespace abigail
+{
+
+namespace symtab_reader
+{
+
+} // end namespace symtab_reader
+} // end namespace abigail
+
+#endif // __ABG_SYMTAB_READER_H__
@@ -46,6 +46,7 @@ runtestkmiwhitelist \
runtestlookupsyms \
runtestreadwrite \
runtestsymtab \
+runtestsymtabreader \
runtesttoolsutils \
runtestsvg \
$(FEDABIPKGDIFF_TEST) \
@@ -156,6 +157,9 @@ runtestcxxcompat_LDADD = libcatch.la $(top_builddir)/src/libabigail.la
runtestsymtab_SOURCES = test-symtab.cc
runtestsymtab_LDADD = libtestutils.la libcatch.la $(top_builddir)/src/libabigail.la
+runtestsymtabreader_SOURCES = test-symtab-reader.cc
+runtestsymtabreader_LDADD = libcatch.la $(top_builddir)/src/libabigail.la
+
runtestsvg_SOURCES=test-svg.cc
runtestsvg_LDADD=$(top_builddir)/src/libabigail.la
new file mode 100644
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+// -*- Mode: C++ -*-
+//
+// Copyright (C) 2020 Google, Inc.
+//
+// Author: Matthias Maennich
+
+/// @file
+///
+/// This program tests libabigail's symtab reader.
+
+#include "lib/catch.hpp"
+
+#include "abg-symtab-reader.h"
+