From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Jason Molenda Cc: gdb-patches@sources.redhat.com, Tom Tromey Subject: Re: [RFA] patch to add 'maint profile-gdb' command Date: Wed, 12 Sep 2001 11:28:00 -0000 Message-id: <3B9FA958.6010607@cygnus.com> References: <20010910003022.A21681@shell17.ba.best.com> <3B9CE0C6.5060700@cygnus.com> <20010910115244.A25119@shell17.ba.best.com> X-SW-Source: 2001-09/msg00165.html > i think the command should always be present. looking at the patch, it >> appears to have started out that way. > > > I'd disagree. First, these functions are not very portable. Our > very own RH 6.2 box that is sourceware.cygnus.com does not have > moncontrol() or monstart(), and -pg doesn't seem to be usable at > all. My RH 7.1 box at home works fine. MacOS X's FreeBSD works > fine. Second, you definitely don't want to compile gdb with -pg > by default - the compiler inserts a bunch of bookkeeping code and > functions, and that'll be a real performance penalty. while the command is always present it wouldn't do much by default. the function that implements the command throws an error. is that making more sense? > are you sure no changes to maint.exp are needed? not needing them feels >> wrong. > > > The "help maint" test in maint.exp globs it up. You don't want to include > a check for maint profile-gdb in here because you'd get a FAIL when gdb > was not configured --enable-profiling. or to turn it around, will an --enable-profiling gdb have additional failures? i don't think that enabling profiling should affect the test results. andrew