From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20584 invoked by alias); 28 Sep 2005 03:23:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20544 invoked by uid 22791); 28 Sep 2005 03:23:12 -0000 Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 28 Sep 2005 03:23:12 +0000 Received: from kahikatea.snap.net.nz (p223-tnt1.snap.net.nz [202.124.110.223]) by viper.snap.net.nz (Postfix) with ESMTP id 4510668963A; Wed, 28 Sep 2005 15:23:03 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 834F883C7; Wed, 28 Sep 2005 15:25:04 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17210.3343.945649.693494@kahikatea.snap.net.nz> Date: Wed, 28 Sep 2005 03:23:00 -0000 To: Kris Warkentin Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Get make TAGS to work in gdb directory In-Reply-To: <43317105.9040201@qnx.com> References: <17200.36038.631429.268643@farnswood.snap.net.nz> <43317105.9040201@qnx.com> X-SW-Source: 2005-09/txt/msg00266.txt.bz2 Kris Warkentin writes: > Wow! I had no idea that even existed. I always just did ctags `find . > -name "*.[ch]"`. I suppose that the make TAGS is smart enough to only > generate tags for the source files that have been configured for your > target? How handy! Actually, it creates TAGS for files that aren't compiled through ALLDEPFILES. However it finds the tags for the source files that have been configured first: # Put the proper machine-specific files first, so M-. on a machine # specific routine gets the one for the correct machine. (FIXME: those # files go in twice; we should be removing them from the main list). So in my case I find child_wait in linux-nat.c (compiled as part of my gdb) and then inftarg.c (not compiled). That comment and this one: # Header files that need to have srcdir added. Note that in the cases # where we use a macro like $(gdbcmd_h), things are carefully arranged # so that each .h file is listed exactly once (M-x tags-search works # wrong if TAGS has files twice). Because this is tricky to get # right, it is probably easiest just to list .h files here directly. seem inaccurate in that etags seems to ignore duplicate file names. It might make sense just to include files that are configured in that if users want them all they can just use ctags/etags directly as you have done. In any case there seem to be other files in COMMON_OBS for which TAGS should be generated e.g. annotate.c. How about the patch below? Nick *** Makefile.in.~1.755~ 2005-09-28 15:08:01.000000000 +1200 --- Makefile.in 2005-09-28 15:10:07.388706664 +1200 *************** *** 886,897 **** SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS) # Don't include YYFILES (*.c) because we already include *.y in SFILES, # and it's more useful to see it in the .y file. ! TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ $(CONFIG_SRCS) TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) ! COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \ ! version.o \ annotate.o \ auxv.o \ bfd-target.o \ --- 886,898 ---- SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS) # Don't include YYFILES (*.c) because we already include *.y in SFILES, # and it's more useful to see it in the .y file. ! TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(OTHER_COMMON_OBS) \ $(CONFIG_SRCS) TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) ! COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) $(OTHER_COMMON_OBS) ! ! OTHER_COMMON_OBS = version.o \ annotate.o \ auxv.o \ bfd-target.o \