summaryrefslogtreecommitdiffstats
path: root/libcpp/include
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-17 09:59:40 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-17 09:59:40 +0000
commit62db153a9b1799e87fcc12393c34a4c9a1fa0ef5 (patch)
tree1df29dda9c3f6fb6e559fa82140695ea5b6130d1 /libcpp/include
parent3de02a0fadcb82dc5ec168ca091a6f47ffe0575b (diff)
downloadppe42-gcc-62db153a9b1799e87fcc12393c34a4c9a1fa0ef5.tar.gz
ppe42-gcc-62db153a9b1799e87fcc12393c34a4c9a1fa0ef5.zip
Support -fdebug-cpp option
This patch adds -fdebug-cpp option. When used with -E this dumps the relevant macro map before every single token. This clutters the output a lot but has proved to be invaluable in tracking some bugs during the development of the virtual location support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180084 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/include')
-rw-r--r--libcpp/include/cpplib.h4
-rw-r--r--libcpp/include/line-map.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 3e01c112140..825bf2fc6ff 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -392,6 +392,10 @@ struct cpp_options
/* Nonzero means we're looking at already preprocessed code, so don't
bother trying to do macro expansion and whatnot. */
unsigned char preprocessed;
+
+ /* Nonzero means we are going to emit debugging logs during
+ preprocessing. */
+ unsigned char debug;
/* Nonzero means we are tracking locations of tokens involved in
macro expansion. 1 Means we track the location in degraded mode
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 724f3f0f8b0..04a523c2bfc 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -675,4 +675,8 @@ expanded_location linemap_expand_location_full (struct line_maps *,
source_location loc,
enum location_resolution_kind lrk);
+/* Dump debugging information about source location LOC into the file
+ stream STREAM. SET is the line map set LOC comes from. */
+void linemap_dump_location (struct line_maps *, source_location, FILE *);
+
#endif /* !LIBCPP_LINE_MAP_H */
OpenPOWER on IntegriCloud