#!/usr/bin/env bash

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

export PYTHONPATH=/opt/openenclave/lib/openenclave/debugger/gdb-sgx-plugin
LD_PRELOAD=/opt/openenclave/lib/openenclave/debugger/liboe_ptrace.so gdb -iex "directory /opt/openenclave/lib/openenclave/debugger/gdb-sgx-plugin" -iex "source /opt/openenclave/lib/openenclave/debugger/gdb-sgx-plugin/gdb_sgx_plugin.py" -iex "set environment LD_PRELOAD" -iex "add-auto-load-safe-path /usr/lib" "$@"
