I have encountered a Malicious Shell-Code & i have ported the shellcode into a compatible C Code which can run the shellcode, i compiled it using 
gcc -fno-stack-protector -z execstack shellcode.c -o code which gives output ELF file code, i am planning to analyze the File by using gdb ./code command to see the functions & to research the Shell-Code. 
Now my question is does an Untrusted ELF file running in gdb can cause File execution outside gdb ? Because if the shell-code is rm -rf / --no-preserve-root that it is a security Implication or a Shell-code which uses Remote connection is also a Threat, so does command gdb ./code runs the code completely or just simply port the code to gdb, because after that i can use Breakpoints before shell code execution to analyze.
Any answer would be appreciated.