Skip to contentSkip to conversation

The updated sparse ctags

PATCH In review Christopher Li 2 participants 2 messages Jan 17, 2007

Subsystems (2)
lore
Share & tools
lore

Christopher Li

author maintainer
#0 lore raw

PATCH 1/1 The updated sparse ctags

This is the updated ctags that actually generate output to tags file.

symbol.h +4 -0
Index: sparse/symbol.h
===================================================================
@@ -133,6 +133,10 @@ struct symbol {
 	union /* backend */ {
 		struct basic_block *bb_target;	/* label */
 		void *aux;			/* Auxiliary info, eg. backend information */
+		struct {			/* sparse ctags */
+			char kind;
+			unsigned char visited:1;
+		};
 	};
 	pseudo_t pseudo;
 };
Makefile +6 -1
Index: sparse/Makefile
===================================================================
@@ -22,7 +22,8 @@ LIBDIR=$(PREFIX)/lib
 INCLUDEDIR=$(PREFIX)/include
 PKGCONFIGDIR=$(PREFIX)/share/pkgconfig
 
-PROGRAMS=test-lexing test-parsing obfuscate compile graph sparse test-linearize example test-unssa test-dissect
+PROGRAMS=test-lexing test-parsing obfuscate compile graph sparse test-linearize example \
+	 test-unssa test-dissect ctags
 INST_PROGRAMS=sparse cgcc
 
 LIB_H=    token.h parse.h lib.h symbol.h scope.h expression.h target.h \
@@ -93,6 +94,9 @@ test-unssa: test-unssa.o $(LIBS)
 test-dissect: test-dissect.o $(LIBS)
 	$(CC) $(LDFLAGS) -o $@ $< $(LIBS)
 
+ctags: ctags.o
+	$(CC) $(LDFLAGS) -o $@ $< $(LIBS)
+
 $(LIB_FILE): $(LIB_OBJS)
 	$(AR) rcs $@ $(LIB_OBJS)
 
@@ -122,6 +126,7 @@ test-lexing.o: $(LIB_H)
 test-parsing.o: $(LIB_H)
 test-linearize.o: $(LIB_H)
 test-dissect.o: $(LIB_H)
+ctags.o: $(LIB_H)
 compile.o: $(LIB_H) compile.h
 compile-i386.o: $(LIB_H) compile.h
 tokenize.o: $(LIB_H)
ctags.c +210 -0

210 lines not on this page · raw message

#1 lore raw
Quoted 3 lines · Christopher Li

This is the updated ctags that actually generate output to tags file.

Merged, along with a Makefile fix, a .gitignore entry for ctags, some minor typo fixes, and the full description from your original commit message.

- Josh Triplett