(target=sys.stdout, with_banner=True, width=None)
Print out the source of the current function decompiled by ghidra.

    The context-ghidra config parameter is used to configure whether to always,
    never or only show the context if no source is available.
Print out the source of the current function decompiled by ghidra.
Print out the source of the current function decompiled by ghidra .
def context_ghidra(target=sys.stdout, with_banner=True, width=None):
    """
    Print out the source of the current function decompiled by ghidra.

    The context-ghidra config parameter is used to configure whether to always,
    never or only show the context if no source is available.
    """
    banner = [pwndbg.ui.banner("ghidra decompile", target=target, width=width)] if with_banner else []

    if config_context_ghidra == "never":
        return []

    if config_context_ghidra == "if-no-source":
        source_filename = pwndbg.symbol.selected_frame_source_absolute_filename()
        if source_filename and os.path.exists(source_filename):
            return []

    try:
        return banner + pwndbg.ghidra.decompile().split('\n')
    except Exception as e:
        return banner + [message.error(e)]
def context_ghidra ( target = sys . stdout , with_banner = True , width = None ) : banner = [ pwndbg . ui . banner ( "ghidra decompile" , target = target , width = width ) ] if with_banner else [ ] if config_context_ghidra == "never" : return [ ] if config_context_ghidra == "if-no-source" : source_filename = pwndbg . symbol . selected_frame_source_absolute_filename ( ) if source_filename and os . path . exists ( source_filename ) : return [ ] try : return banner + pwndbg . ghidra . decompile ( ) . split ( '\n' ) except Exception as e : return banner + [ message . error ( e ) ]