__breakpoint intrinsic

This intrinsic inserts a BKPT instruction into the instruction stream generated by the compiler. It enables you to include a breakpoint instruction in your C or C++ code.

Show/hideSyntax

void __breakpoint(int val)

Where:

val

is a compile-time constant integer whose range is:

0 ... 65535

if you are compiling source as ARM code

0 ... 255

if you are compiling source as Thumb code.

Show/hideErrors

The compiler does not recognize the __breakpoint intrinsic when compiling for a target that does not support the BKPT instruction. The compiler generates either a warning or an error in this case.

The undefined instruction trap is taken if a BKPT instruction is executed on an architecture that does not support it.

Show/hideExample

void func(void)
{
    ...
    __breakpoint(0xF02C);
    ...
}

Show/hideSee also

  • BKPT in the Assembler Reference.

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0491F
Non-ConfidentialID091611