Thanks a lot @smth
The links are very helpful. I replicate the demo provided in the scipy-lectures, but failed.
Focus on one: /Users/Natsume/Desktop
 ->gdb python3
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin16.7.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python3...(no debugging symbols found)...done.
(gdb) run segfault.py
Starting program: /usr/local/bin/python3 segfault.py
[New Thread 0x1403 of process 2470]
warning: unhandled dyld version (15)
[New Thread 0x1503 of process 2470]

Thread 3 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x1503 of process 2470]
0x0000000100005000 in ?? ()
(gdb) bt
#0  0x0000000100005000 in ?? ()
#1  0x0000000100000000 in ?? ()
#2  0x0000000000000002 in ?? ()
#3  0x00007fff5fbff988 in ?? ()
#4  0x00007fff5fbff9fc in ?? ()
#5  0x0000000000000000 in ?? ()
(gdb)

Do you what is wrong with it? is it my gdb is not working properly or I didn’t actually install gdb correctly? you can also check my 2 attempts above in my question.
Reading symbols from python3...(no debugging symbols found)...done.

is this supposed to happen?
Could you help me confirm whether it is the problem of my gdb?
Thanks a lot!