본문 바로가기

etc infomation

심볼 서버 만들기

심볼 서버를 만드는 방법에 대해서 간단하게 제 블로그에 정리해 놓겠습니다.

Daily Build 시스템과 Symbol Server는 꼭 구축해 놓아야 차후 버그를 바로 바로 수정할 수 있습니다.

1. 심볼 서버(심볼 스토어)란?

심볼 스토어(Symbol Store)란 쉽게 말하면 MS 웹심볼 서버 같이 심볼파일들을 모든 버전에 대해서 모아 놓는 곳을 의미합니다. 즉, 데일리 빌드 시스템에서 나온 모든 바이너리에 대한 심볼 파일들을 한곳에 모아놓은 저장소( 폴더) 라고 생각하면 됩니다. 차후에 버그가 발생하면 WinDbg에 심볼 경로 지정 해서 쉽게 디버깅하기 위해서 사용한다고 할 수 있습니다.

2. 심볼 체커(운영체제 심볼 다운 받기)

symchk /r C:\WINNT\SYSTEM32 /s SRV*d:\SYMBOLS_OS*http://msdl.microsoft.com/download/symbols

위 명령을 실행하면 system32 폴더 포함해서 하위에 있는 모든 바이너리에 대한 운영체제 심볼을 다운받으라는 명령입니다.

3. 심볼 서버 (symstore.exe)

symstore add /r /f D:\build\*.* /s d:\SYMBOLS_APP /t "MyApp" /v "Build 101" /c "2007/11/13 Daily Build"

위 명령을 실행하면 데일리 빌드 한 이후에 생성된 심볼에 대해서 특정 폴더에 심볼을 저장하라는 명령입니다.

[SymStore Command-Line Options]
example

symstore add [/l /o /p /r] /f File /s Store /t Product [/v Version] [/c Comment] [/d LogFile]

symstore add [/a /l /o /p /r] /g Share /f File /x IndexFile [/d LogFile]

symstore add [/o /p] /y IndexFile /g Share /s Store /t Product [/v Version] [/c Comment] [/d LogFile]

symstore del /i ID /s Store [/o] [/d LogFile]

symstore /?

Parameter Meaning
/f File Specifies the network path of files or directories to add.
/g Share Specifies the server and share where the symbol files were originally stored. When used with /f, Share should be identical to the beginning of the File specifier. When used with /y, Share should be the location of the original symbol files (not the index file). This allows you to later change this portion of the file path in case you move the symbol files to a different server and share.
/i ID Specifies the transaction ID string.
/l Allows the file to be in a local directory rather than a network path. (This option is only used with the /p option.)
/p Causes SymStore to store a pointer to the file, rather than the file itself.
/r Causes SymStore to add files or directories recursively.
/s Store Specifies the root directory for the symbol store.
/t Product Specifies the name of the product.
/v Version Specifies the version of the product.
/c Comment Specifies a comment for the transaction.
/d LogFile Specifies a log file to be used for command output. If this is not included, transaction information and other output is sent to stdout.
/o Causes SymStore to display verbose output.
/x IndexFile Causes SymStore not to store the actual symbol files. Instead, SymStore records information in the IndexFile that will enable SymStore to access the symbol files at a later time.
/a Causes SymStore to append new indexing information to an existing index file. (This option is only used with the /x option.)
/y IndexFile Causes SymStore to read the data from a file created with /x.
/? Displays help text for the SymStore command.

4. 종합

데일리 빌드 한 후에는 자동적으로 특정 폴더에 모든 심볼을 저장하도록 시스템을 구축해 놓아야 차후 발생하는 버그에 대비 할 수 가 있습니다. 솔직히 귀찮은 작업이 많이 있습니다. 그래도 심볼을 제대로 관리해야 합니다. 만약에 하지 못하면 차후 버그가 발생했을 때 심볼 서버를 구축하지 않았다면 심볼이 있을때와 달리 없어 디버깅 하는데 삽질을 초특급 울트라고 몇배 이상 해야 합니다. 꼭 심볼서버 구축하세요~

p.s. symchk.exe와 symstore.exe 파일은 windbg가 설치된 폴더에 있습니다

출처 : 다년간의 프로그램밍 경험(삽질)

[출처] 심볼 서버를 만들어 보자. (symstore.exe)|작성자 갱주니 (http://process3.blog.me/20043743102)