Return the current brk value in the debugged process (only x86 Linux)
172662
def get_dbg_brk_linux32():
    '''
    
    '''
    # TODO this method is so weird, find a unused address to inject code not
    # the base address

    debugger = get_debugger()

    code = b'\xcd\x80'  # int 0x80

    eax = debugger.get_reg("eax")
    ebx = debugger.get_reg("ebx")
    eip = debugger.get_reg("eip")
    efl = debugger.get_reg("efl")

    debugger.set_reg("eax", 45)  # sys_brk
    debugger.set_reg("ebx", 0)

    base = debugger.image_base()

    inj = base

    save = debugger.get_bytes(inj, len(code))

    debugger.put_bytes(inj, code)

    debugger.set_reg("eip", inj)

    debugger.step_into()
    debugger.wait_ready()

    brk_res = debugger.get_reg("eax")

    debugger.set_reg("eax", eax)
    debugger.set_reg("ebx", ebx)
    debugger.set_reg("eip", eip)
    debugger.set_reg("efl", efl)

    debugger.put_bytes(inj, save)

    return brk_res
747858
def get_current_desktop(self):
        
        desktop = ctypes.c_long(0)
        _libxdo.xdo_get_current_desktop(self._xdo, ctypes.byref(desktop))
        return desktop.value
1165575
def debug=(value)
            value = value ? true : false
            if @debug && !value
                $stderr.puts "=== #{ self }.debug=false"
            elsif !@debug && value
                $stderr.puts "=== #{ self }.debug=true"
            end
            @debug = value
        end
864731
@Deprecated
    public int current() {
        if(bufferPos<buffer.length() || nextNormalize()) {
            return buffer.codePointAt(bufferPos);
        } else {
            return DONE;
        }
    }
582470
function BRK() {
		var high, low;

		PC += 1;
		push( (PC & HIGH) >> 8 );
		push( PC & LOW );

		setP();
		push( P|0x10 );

		low = peek(0xfffe);
		high = peek(0xffff) << 8;
		PC = high | low;
	}
636529
def _at_debug(self, calculator, rule, scope, block):
        
        setting = block.argument.strip()
        if setting.lower() in ('1', 'true', 't', 'yes', 'y', 'on'):
            setting = True
        elif setting.lower() in ('0', 'false', 'f', 'no', 'n', 'off', 'undefined'):
            setting = False
        self.ignore_parse_errors = setting
        log.info("Debug mode is %s", 'On' if self.ignore_parse_errors else 'Off')
539914
def _checkblk(name):
    '''
    
    '''

    blk = __salt__['cmd.run']('blkid -o value -s TYPE {0}'.format(name),
                              ignore_retcode=True)
    return '' if not blk else blk
908960
async def debug(self, conn_id, name, cmd_args):
        

        progress_callback = functools.partial(_on_progress, self, 'debug', conn_id)

        resp = await self._execute(self._adapter.debug_sync, conn_id, name, cmd_args, progress_callback)
        _raise_error(conn_id, 'send_rpc', resp)

        return resp.get('return_value')
1035732
def get_debug_info():
        
        from . import __version__
        from .parser import SPEC_VERSION
        d = OrderedDict()
        d['Version'] = '%s' % __version__
        d['Spec version'] = SPEC_VERSION

        return d
52926
def display_callback(self, cpu_cycles, op_address, address, value):
        
        self.display.write_byte(cpu_cycles, op_address, address, value)
        return value
1133304
def debug(self, defn, args, kwargs, fmt=None, color='green'):
    
    ta = datetime.datetime.now()
    rs = defn(*args, **kwargs)  
    tb = datetime.datetime.now() - ta
    fmt = fmt or "processed {defn} in {ms}ms"
    logmsg = fmt.format(ms=tb.microseconds/1000.0, defn=defn)
    "terminal output"
    print cl(logmsg, color)
    "logging output"
    logging.debug(logmsg)
    return rs
737585
def c_getprocs(self):
        """"""
        getprocs = []
        for name, dummy_args in self.funcs:
            if name == 'GetProcAddress':
                if callable(self.opts.hash_func):
                    continue
                getter = 'get_proc_by_string'
            elif self.opts.no_structs:
                getter = 'GetProcAddress'
            else:
                getter = 'windll->kernel32.GetProcAddress'
            if callable(self.opts.hash_func):
                getter = 'get_proc_by_hash'
            if self.opts.no_structs:
                var = name
            else:
                var = 'windll->{}.{}'.format(self.name, name)
            getproc = '{} = ({} *){}({}, {}{});\n'.format(
                var,
                self._c_type_name(name),
                getter,
                self._c_base_var(),
                self.opts.prefix, name
            )
            getprocs.append(getproc + self._c_null_check(var))
        return getprocs
1228701
def debug_callback(event, *args, **kwds):
    '''
    '''
    l = ['event %s' % (event.type,)]
    if args:
        l.extend(map(str, args))
    if kwds:
        l.extend(sorted('%s=%s' % t for t in kwds.items()))
    print('Debug callback (%s)' % ', '.join(l))
717842
def debug(*args, **attrs):
    """"""
    attrs.setdefault("is_flag", True)
    attrs.setdefault("default", None)
    return option(debug, *args, **attrs)
1197533
private static void dumpOutDebugInfo() {

        LOG.info("Dump debug output");
        Map<String, String> envs = System.getenv();
        for (Map.Entry<String, String> env : envs.entrySet()) {
            LOG.info("System env: key=" + env.getKey() + ", val=" + env.getValue());
            System.out.println("System env: key=" + env.getKey() + ", val="
                    + env.getValue());
        }

        BufferedReader buf = null;
        try {
            String lines = Shell.WINDOWS ? Shell.execCommand("cmd", "/c", "dir") :
                    Shell.execCommand("ls", "-al");
            buf = new BufferedReader(new StringReader(lines));
            String line = "";
            while ((line = buf.readLine()) != null) {
                LOG.info("System CWD content: " + line);
                System.out.println("System CWD content: " + line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            org.apache.hadoop.io.IOUtils.cleanup(LOG, buf);
        }
    }
1155121
def GetCpuShares(self):
        ''''''
        counter = c_uint()
        ret = vmGuestLib.VMGuestLib_GetCpuShares(self.handle.value, byref(counter))
        if ret != VMGUESTLIB_ERROR_SUCCESS: raise VMGuestLibException(ret)
        return counter.value
731095
def checkdebug(self):
        
        # Global debugging
        opt = self.file_grep(r"^(DEFAULT_LOGGING|DAEMONOPTIONS)=(.*)",
                             *self.files)
        for opt1 in opt:
            for opt2 in opt1.split(" "):
                if opt2 in ("--debug", "debug"):
                    return True
        return False