public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/19521] New: omitted stab for gcov initialization function
@ 2005-01-19  0:37 stuart at apple dot com
  2005-01-19  0:40 ` [Bug debug/19521] " stuart at apple dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: stuart at apple dot com @ 2005-01-19  0:37 UTC (permalink / raw)
  To: gcc-bugs

gcov support entails an initialization function named "__GLOBAL__I_0_noop".
GCC omits function-begin stab for this function.

Here is the commandline:


[morris:/Volumes/sandbox/stuart] hasting2%
\/Volumes/sandbox/stuart/gcc.fsf.obj/gcc/xgcc -B
\/Volumes/sandbox/stuart/gcc.fsf.obj/gcc -g gcov.c -fprofile-arcs \
-ftest-coverage  -S

Given the .s file from the above, here is a check of the output:

[morris:/Volumes/sandbox/stuart] hasting2% egrep 'noop|main' gcov.s
        .globl _noop
_noop:
        .stabs  "noop:F(0,1)=(0,1)",36,0,7,_noop
        .stabs  "",36,0,0,Lscope0-_noop
        .globl _main
_main:
        bl _noop
        .stabs  "main:F(0,2)=r(0,2);-2147483648;2147483647;",36,0,11,_main
        .stabn  192,0,0,_main
        .stabs  "",36,0,0,Lscope1-_main
__GLOBAL__I_0_noop:
        .stabs  "",36,0,0,Lscope2-__GLOBAL__I_0_noop
        .long   __GLOBAL__I_0_noop
        .long   __GLOBAL__I_0_noop
[morris:/Volumes/sandbox/stuart] hasting2%

The 'stabs "",36' record seems to signify the end-of-the __GLOBAL__I_0_noop
function.  The matching start-function record is missing; compare with the noop
and main functions.

The testcase is from the GCC testsuite: gcc/testsuite/gcc.misc-tests/gcov-1.c gcov.c

Since it's short, here is the testcase:

/* Test Gcov basics.  */

/* { dg-options "-fprofile-arcs -ftest-coverage" } */
/* { dg-do run { target native } } */

void noop ()
{
}

int main ()
{
  int i;

  for (i = 0; i < 10; i++)      /* count(11) */
    noop ();                    /* count(10) */

  return 0;                     /* count(1) */
}

/* { dg-final { run-gcov gcov-1.c } } */

-- 
           Summary: omitted stab for gcov initialization function
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stuart at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin
  GCC host triplet: powerpc-apple-darwin
GCC target triplet: powerpc-apple-darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19521


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-02-17  3:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-19  0:37 [Bug debug/19521] New: omitted stab for gcov initialization function stuart at apple dot com
2005-01-19  0:40 ` [Bug debug/19521] " stuart at apple dot com
2005-01-19  0:49 ` stuart at apple dot com
2005-01-19  1:06 ` pinskia at gcc dot gnu dot org
2005-01-19  1:16 ` [Bug debug/19521] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-01-19  2:35 ` rth at gcc dot gnu dot org
2005-01-19 17:08 ` stuart at apple dot com
2005-02-14 19:03 ` steven at gcc dot gnu dot org
2005-02-16 22:39 ` cvs-commit at gcc dot gnu dot org
2005-02-17  3:33 ` rth at gcc dot gnu dot org
2005-02-17 14:00 ` danglin at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).