Slide 1

Don’t be scared of hardware only bugs

So

Using the emulator

What does a panic look like?

What does a panic look like?

What does a panic look like?

Tips

Tips

What is a panic?

What does a panic look like?

Call Stack

Call Stack

Debugging Memory Leaks

Using Hook Logger

1. Attach the Hooks

2. Start the UI

3. Reproduce the leak

3. Reproduce the leak

4. Find the bad thread

5. Show heap allocations

6. Find the bad allocation

Panics on Hardware

Hardware situation

Why are there two kinds?

Here’s where it happens

Need some more information!

Hardware Panics

Application panic

System panic

Tackling a hardware panic

Use the OS Library to look up Panic codes

Useful call stacks from Hardware

How do I get a call stack?
Application panic

How do I get a call stack?
Application panic

Stack.txt

What next

And then?

But what about system panics?

What do I ask it?

Connect the crash debugger

Find the fault

Find the fault

Some background - APCS

Finding the panicked thread

What do all those numbers mean?

What do all those numbers mean?

What do all those numbers mean?

Finding the panicked thread

What do all those numbers mean?

What next? - The Program counter

Program counter

What next? - The call stack

Yuk! Hex

More hex!

Decoding the data using printsym

Warning: stack overflow == KE3

Checking for stack overflow

Checking for stack overflow

Decoding the stack dump output

What if the program is not in ROM?

Anything else?

Debugging on hardware is hard?

Tips

ROM Symbol file format