<commit_before>#!/bin/bash

# Generates debugging symbols for breakpad. qt and phantomjs must have
# been compiled in debug mode. So do:
#
#  $ make distclean && cd src/qt && make clean && cd ../..
#  $ ./build.sh --qt-config "-debug -webkit-debug"
#  $ tools/dump-symbols.sh
#
# To display the crash report:
#
#  $ tools/crash-report.sh /tmp/5e2cc287-96c8-7a1b-59c79999-00fa22a2.dmp

mkdir -p symbols
rm -r symbols/*

files=""
files+="bin/phantomjs "

if [[ $OSTYPE = darwin* ]]; then
    # To compile this program, run ../src/qt/bin/qmake dump-syms-mac.pro && make from tools/
    dump_syms="tools/dump_syms.app/Contents/MacOS/dump_syms"
else
    files+="src/qt/lib/libQtCore.so.4.8.0 "
    files+="src/qt/lib/libQtWebKit.so.4.9.0 "
    files+="src/qt/lib/libQtGui.so.4.8.0 "
    files+="src/qt/lib/libQtNetwork.so.4.8.0"

    # To compile this program, run ./configure && make from src/breakpad/
    dump_syms="src/breakpad/src/tools/linux/dump_syms/dump_syms"
fi

for file in $files; do
    name=`basename $file`
    $dump_syms $file > $name.sym
    dir=symbols/$name/`head -n1 $name.sym | cut -d ' ' -f 4`
    mkdir -p $dir
    mv $name.sym $dir<commit_msg>fix lib paths for dump-symbols.sh<commit_after>#!/bin/bash

# Generates debugging symbols for breakpad. qt and phantomjs must have
# been compiled in debug mode. So do:
#
#  $ make distclean && cd src/qt && make clean && cd ../..
#  $ ./build.sh --qt-config "-debug -webkit-debug"
#  $ tools/dump-symbols.sh
#
# To display the crash report:
#
#  $ tools/crash-report.sh /tmp/5e2cc287-96c8-7a1b-59c79999-00fa22a2.dmp

mkdir -p symbols
rm -r symbols/*

files=""
files+="bin/phantomjs "

if [[ $OSTYPE = darwin* ]]; then
    # To compile this program, run ../src/qt/bin/qmake dump-syms-mac.pro && make from tools/
    dump_syms="tools/dump_syms.app/Contents/MacOS/dump_syms"
else
    files+="src/qt/lib/libQtCore.so.4.8.2 "
    files+="src/qt/lib/libQtWebKit.so.4.9.2 "
    files+="src/qt/lib/libQtGui.so.4.8.2 "
    files+="src/qt/lib/libQtNetwork.so.4.8.2"

    # To compile this program, run ./configure && make from src/breakpad/
    dump_syms="src/breakpad/src/tools/linux/dump_syms/dump_syms"
fi

for file in $files; do
    name=`basename $file`
    $dump_syms $file > $name.sym
    dir=symbols/$name/`head -n1 $name.sym | cut -d ' ' -f 4`
    mkdir -p $dir
    mv $name.sym $dir
{'fraction_non_alphanumeric': 0.16638225255972697, 'fraction_numerical': 0.030716723549488054, 'mean_word_length': 2.9813242784380307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3999738', 'n_tokens_mistral': 988, 'n_tokens_neox': 939, 'n_words': 201}