cscope 에서 참조하지 못하는 함수가 있네요..

choco6의 이미지

회사 서버 사이드의 소스를 개발 및 유지보수하고 있는데 소스분석을 위해 cscope를 설치하여 사용중입니다.
그런데 거의 모든 심볼을 참조해주는 cscope에서 참조를 못하는 함수타입이 있네요.. 함수포인터를 인수로 받는 함수는 전혀 참조를 못하더군요..
가령, 다음과 같이 정의된 함수가 있다면..

int
initSignalRoleChange( void (*roleChangeAction)(int oldRole,
                                               int newRole) )
{
   ...bla... bla...

}

이 함수를 콜하는 부분에서 참조검색을 해봐도 cscope에서는 no match found 만 뿌려대고 함수가 정의된 곳을 찾지 못하네요..
cscope만 믿고 괜히 후임 프로그래머에게 핀잔만 주었네요.. --;;

bootmeta의 이미지

cscope man page 주의 사항 부분 내용입니다.
http://cscope.sourceforge.net/cscope_man_page.html

1. 변수 선언, 함수 정의나 call이 #if 블럭 안에 있는 경우 인식 못 할 수도 있다.

2. #if 문 앞에 오는 typedef 이름은 전역 변수 정의로 부정확하게 인식 될 수 있다.

LDFILE  *
 #if AR16WR

3. #if 문 앞에 오는 변수 선언은 전역 변수 정의로 인식되지 않을 수 있다.

 char flag
 #ifdef ALLOCATE_STORAGE
      = -1
 #endif

4. 함수 정의 내부에 선언된 함수 선언은 함수 호출로 인식 될 수 있다.

5. class keywrod만 C++ class로 인식되기 때문에 struct class 내 inline member 함수는 인식하지 못한다.
6. typedef와 같이 쓰이는 class 키워드 역시 정상적으로 인식하지 못한다.

typedef class X * Y;

7. operator 연산자 정의 함수는 인식하지 못한다.

Bool Feature::operator==(const Feature & other)
 { }


8. 함수 포인터가 인자로 오는 함수 정의는 인식하지 못한다.
choco6의 이미지

아~ 이미 정리가 되어있던거군요..
잘 읽었습니다. 앞으로 cscope를 이용할 때 참조해야겠네요..
bootmeta님.. 깔끔한 정리 감사합니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.