title: Why this static function has no debug symbol?
body: <pre><code>(gdb) l main
  ...
  
  4614        if (do_daemonize)
  4615            save_pid(getpid(), pid_file);
  (gdb) l save_pid
    Function "save_pid" not defined.
  </code></pre>
  
  <p>and there's its definition in source file:</p>
  
  <pre><code>static void save_pid(const pid_t pid, const char *pid_file) {
      FILE *fp;
      ...
  }
  </code></pre>
  
  <p><code>save_pid</code> and <code>main</code> are in the same source file,but only <code>main</code> has debug symbol,why??</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Another test case with a really simple static function:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  static int test()
  {
          return 0;
  }
  int main(void)
  {
          //int i = 6;
          printf("%f",6.4);
          return 0;
  }
  
  gcc -Wall -g test.c test
  </code></pre>
  
  <p>But the symbol <code>test</code> is there!</p>