<commit_before>import gdb
from traceback import print_exc
from datetime import datetime

class DumpEnv(gdb.Command):
    def __init__(self):
        super(DumpEnv, self).__init__("dumpenv", gdb.COMMAND_OBSCURE)

    def invoke(self, arg, from_tty):
        pass

DumpEnv()<commit_msg>accidentally committed empty dumpenv gdb script<commit_after>import gdb
from traceback import print_exc
from datetime import datetime

class DumpEnv(gdb.Command):
    def __init__(self):
        super(DumpEnv, self).__init__("dumpenv", gdb.COMMAND_OBSCURE)

    def invoke(self, arg, from_tty):
        pos = 0
        while True:
            val = gdb.parse_and_eval('((char**)environ)[%d]' % pos)
            if 0 == val.cast(gdb.lookup_type('long')):
                break
            print(val.string())
            pos += 1

DumpEnv()
{'fraction_non_alphanumeric': 0.10935601458080195, 'fraction_numerical': 0.0036452004860267314, 'mean_word_length': 3.0392156862745097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '476072', 'n_tokens_mistral': 267, 'n_tokens_neox': 261, 'n_words': 63}