occlum/demos/gdb_support/gdb_sample_on_occlum.sh
LI Qing bd56504b20 Add GDB support for apps running upon Occlum
Please see the "gdb_support" in demos to find out how to
use GDB to debug your apps running upon Occlum.
2020-02-14 07:52:45 +00:00

15 lines
331 B
Bash
Executable File

#!/bin/bash
set -e
rm -rf occlum_context && mkdir -p occlum_context
cd occlum_context
# 1. Initialize a directory as the Occlum context
occlum init
# 2. Generate a secure Occlum FS image and Occlum SGX enclave
cp ../sample image/bin
occlum build
# 3. Debug the user program inside an SGX enclave with GDB
occlum gdb /bin/sample