mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
34 lines
398 B
Plaintext
34 lines
398 B
Plaintext
# Set breakpoint at main
|
|
b main
|
|
# Run the program
|
|
run
|
|
# Step through to see what happens
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
n
|
|
# Now we're in the loop - let's examine the students array
|
|
p num_students
|
|
p students[0]
|
|
p students[1]
|
|
p students[2]
|
|
# Continue to the crash
|
|
c
|
|
# When it crashes, show backtrace
|
|
bt
|
|
# Examine the frame
|
|
frame variable
|
|
# Look at what students[i] is when it crashes
|
|
p i
|
|
p students[i]
|
|
quit
|