Setting Breakpoints

When using a file name/line combination to set the breakpoint, you can specify any file in the program without having to specify a path to that file, as long as the file name is unambiguous.

List Breakpoints

(lldb) breakpoint list
(lldb) b

Backtrace

(lldb) thread backtrace
(lldb) bt

If you would like to limit the size of the backtrace (for example, when you are debugging a case of runaway recursion that blows out the stack and generates a very long backtrace), you can use the --count or -c option to specify the number of frames to print, starting with the most recent one.

You can adjust the type (long) to appropriately print the types that correspond to the array values, and adjust the size (6) to print more or fewer of the elements.

Pony Stuff

Method Name Mangling

Future breakage possible!

While currently necessary for some debugging, you should know that name mangling might change in the future. Do not depend on this remaining static.

Method names get mangled by the compiler. The general format for the mangling is:

<package_>type<_typearg1_typearg2>_rcap_methodname_mangling

In the above:

package

the name of the package (for methods brought in through use expressions)

type

the name of the type to which the method belongs

typearg1, typearg2 …

the type parameters of the method (for methods that use type parameters)

rcap

the reference capability of the method

methodname

the name of the method

mangling

a mangling string where each character indicates the type of each method parameter and the method’s return type according to the following conversion:

Type

Mangling

object

o

Bool

b

I8

c

I16

s

I32

i

I64

w

I128

q

ILong

l

ISize

z

U8

C

U16

S

U32

I

U64

W

U128

Q

ULong

L

USize

Z

F32

f

F64

d

These rules can be used to determine the name of function in order to specify that you would like to place a breakpoint on it. You can also type b <characters><tab> to see a tab-complete list of all the available functions that start with <characters>. To set a breakpoint on a function:

(lldb) breakpoint set --name Bar_foo
(lldb) b Bar_foo

Calling Methods

Behaviors and Messages

Each behavior has an associated send method (__send) that is used to send a message to the receiver to trigger that behavior. Each actor has a dispatch method (_Dispatch) that translates messages into calls to the appropriate functions in the receiver.