The symbol server offers a standalone service for analyzing WebAssembly modules containing DWARF debug symbols.
The symbol server is highly experimental and not officially released as part of chromium. The server is not ready for production use and provides no security from malicious modules or clients of the service. So use at your own discretion!
The server is part of the Chrome DevTools frontend that is available on chromium.googlesource.com.
Building the server requires depot_tools. To check out the source for the DevTools frontend, including the symbol server, follow these steps:
mkdir devtools cd devtools fetch devtools-frontend
The dependencies for the symbol server are not fetched by gclient sync
in DevTools by default. To enable it, run
vim $(gclient root)/.gclient
In the custom_vars
section, insert this line:
"build_symbol_server": True,
Then run glient sync
to fetch the dependencies. To update with the latest upstream changes, simply run git pull
followed by gclient sync
again later.
Building and running the server further require these dependencies:
On Debian, install the dependencies by running
apt install cmake python3 libprotobuf-dev protobuf-compiler swig
On MacOS, install the dependencies by
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install cmake python3 swig protobuf
On Windows, the build requires both Clang and Microsoft Visual Studio 2019 (or higher)
vcpkg install protobuf protobuf:x64-windows
The project uses CMake. To build it, on Linux/MacOS run
mkdir -p out/SymbolServer && cd out/SymbolServer cmake -GNinja ../../back_end/CXXDWARFSymbols ninja ninja check-symbol-server # Run unit and integration tests
On Windows:
run CMake in a Visual Studio Command Prompt, specifying the paths of the Clang compiler and of the vcpkg toolchain file
cmake -GNinja ../../back_end/CXXDWARFSymbols -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -Wno-dev -D CMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -D CMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" ninja ninja check-symbol-server # Run unit and integration tests
(replace c:\vcpkg and the C:/Program Files/LLVM with the actual installation folders)
You can use Goma to speed up building significantly. For this you'll need a recent checkout of depot_tools as well as a v8 checkout.
mkdir -p out/SymbolServer && cd out/SymbolServer cmake -GNinja \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_CXX_COMPILER_LAUNCHER=/path/to/depot_tools/.cipd_bin/gomacc \ -DCMAKE_C_COMPILER_LAUNCHER=/path/to/depot_tools/.cipd_bin/gomacc \ -DCMAKE_C_COMPILER=/path/to/v8/third_party/llvm-build/Release+Asserts/bin/clang \ -DCMAKE_CXX_COMPILER=/path/to/v8/third_party/llvm-build/Release+Asserts/bin/clang++ \ ../../back_end/CXXDWARFSymbols ninja -j100
To run the, use the runner tool:
back_end/CXXDWARFSymbols/tools/symbol-server.py out/SymbolServer/bin/DWARFSymbolServer -I /path/to/wasm/symbol/modules
To avoid having to download lots of symbol modules, the tool accepts -I
arguments pointing to file system directories containing the symbol modules.
You can also pass -watch
when developing the symbol server, which makes the Python script watch the symbol server binary for changes and automatically restart it when changes are detected. For this to work, you need to install the python3-watchdog
package on Debian.
There is experimental support for showing contents for integer and C-string variables. To enable this feature, chrome needs to be started with --js-flags=--wasm-expose-debug-eval
.