Check out Firefox Developer Edition, the first browser built for developers like you. mzl.la/112VrtT

mozilla
Mozilla Developer Network
Sign in with Sign in
    • No translations exist for this article.
    • Add a translation
  • Edit
  • Advanced
    • History
    • Print this page
Your Search Results

    Using the Mozilla symbol server

    In This Article
      1. Using the symbol server in Microsoft Visual C++ 2005+
      2. Using the symbol server in Windbg
      3. Downloading symbols using symchk.exe
      4. Downloading symbols on Linux / Mac OS X
      5. Other Products
      6. The source server
      7. Troubleshooting: Symbols will not download

    The Mozilla project runs a symbol server for trunk Firefox nightly and release builds on Windows. Symbols are available for at least 30 previous days worth of nightly builds, and Firefox releases from 2.0.0.4. This allows debugging of those builds without forcing all users to download large debugging files. The server functions like Microsoft's symbol server so the documentation there can be useful.

    Note that because Mozilla release builds are heavily optimized, debugging is not always easy. The debugger will not be able to show you the content of all variables and the execution path can seem strange because of inlining, tail calls, and other compiler optimizations. The only workaround is to build an unoptimized local build.

    The official symbol server URL for Firefox is symbols.mozilla.org/firefox. You cannot visit this URL directly: you must add it to the symbol path of your debugging tool. In the examples below, a local cache directory is used to avoid repeatedly fetching the PDB from the server. Replace C:\Users\bsmedberg\symbols with an appropriate cache directory on your machine.

    Using the symbol server in Microsoft Visual C++ 2005+

    spacer  spacer

    Using the symbol server in Windbg

    The Windbg symbol path is configured with a string value delimited with asterisk characters. To use only the Mozilla symbol server, add the following entry to your symbol path (note: you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols):

    SRV*c:\symcache\*symbols.mozilla.org/firefox
    

    Set this string as _NT_SYMBOL_PATH in the environment, using the Windbg menus, or by typing the .sympath command. If you would like to get symbols from Microsoft's symbol server as well, you should list that first (note: you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols):

    SRV*c:\symcache\*msdl.microsoft.com/download/symbols;SRV*c:\symcache\*symbols.mozilla.org/firefox
    

    spacer spacer

    Downloading symbols using symchk.exe

    You can also download the symbols using symchk.exe, part of Microsoft's Debugging Tools for Windows. The command should look like this (again, you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols):

    C:\Program Files\Mozilla Firefox>c:\progra~1\debugg~1\symchk.exe /r c:\progra~1\mozill~1\* /s SRV*C:\symcache\*symbols.mozilla.org/firefox
    

    Note the \* after the Mozilla directory. The output of this command should be similar to:

    SYMCHK: fullsoft.dll         FAILED  - Image is split correctly, but fullsoft.dbg is missing
    SYMCHK: qfaservices.dll      FAILED  - qfaservices.pdb mismatched or not found
    SYMCHK: talkback.exe         FAILED  - Built without debugging information.
    SYMCHK: helper.exe           FAILED  - Built without debugging information.
    
    SYMCHK: FAILED files = 4
    SYMCHK: PASSED + IGNORED files = 179
    

    Downloading symbols on Linux / Mac OS X

    For Linux and Mac OS X there is a Python script to download symbols from the Mozilla symbol server for gdb, Shark and other software that uses symbols. Note that the symbol file for the XUL library is very large and takes some time to download. This may make it appear as if the script has gotten stuck, but it will continue.

    Symbol indices are named like so: symbols.mozilla.org/{lowercased:Name}/{lowercased:Name}-{Version}-{Platform}-{BuildID}-symbols.txt. The Platform is either 'Darwin' (for Mac) or 'Linux'. The rest of values are based on the contents of the application.ini file under the [App] heading: For example, the Thunderbird 3.1b2 release with Name=Thunderbird, Version=3.1b2, BuildID=20100430125415 would have a filename of "thunderbird-3.1b2-Linux-20100430125415-symbols.txt" under the thunderbird directory at symbols.mozilla.org.  Its contents are a list of paths to files, all relative to the directory the BLAH-symbols.txt file is found in.

    Other Products

    Other applications have the following symbol server URLs:

    • Thunderbird—symbols.mozilla.org/thunderbird
    • SeaMonkey—symbols.mozilla.org/seamonkey
    • XULRunner—symbols.mozilla.org/xulrunner
    • Firefox Mobile—symbols.mozilla.org/fennec

    The source server

    In addition to symbols, Mozilla also has a source server, letting you do source-level debugging and inspection on demand.

    Troubleshooting: Symbols will not download

    If symbols will not download no matter what you do, the problem may be that Internet Explorer has been set to the Work Offline mode. You will not receive any warnings of this in Windbg, Visual C++ or Visual Studio. Even using the command line with symchk.exe to download symbols will fail. This is because Microsoft uses Internet Explorer's internet & proxy settings to download the symbol files. Check the File menu of Internet Explorer to ensure "Work Offline" is unchecked.

    Document Tags and Contributors

    Tags: 
    • Developing Mozilla
    Contributors to this page: jenzed, VladVukicevic, Shaver, SamB, asutherland@asutherland.org, BenjaminSmedberg, noah, Philip Chee, NTHOMAS, Ted_Mielczarek, jalsot, Cf1, Yuhong, JohnMcDonnell, Djpnewton, Jonathan_Watt, Standard8, Neil, Jmdesp
    Last updated by: NTHOMAS,
    gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.