EntryPoints-EntriesByAttribute

Consider routines decorated with special attributes as externally called entry points

Required inputs: IR

This rule identifies additional entry points based on attributes applied to the function declaration.

This rule typically is used to easily add entry points where your code uses an attribute mechanism provided by the language or compiler to denote an IRQ handler or similar. For example:

[[interrupt]] void my_interrupt()

void __attribute__((interrupt)) my_other_interrupt()

Cases like these would be found by this rule when you add interrupt to the attributes.

Configuration of entry points is required for dead code analysis and static semantic analysis.

Possible Messages

This rule has no predefined messages.

Options

The following places define options that affect this rule: Analysis-GlobalOptions

attributes

attributes : set[bauhaus.analysis.config.GlobPattern] = {'::interrupt', 'interrupt'}

A set of names of attributes (globbing patterns are supported). All routines that are decorated with an attribute from this list, or for which one of their enclosing constructs is decorated with such an attribute, are considered entry points.
 

descend_stop_at

descend_stop_at : set[str] = set()

Set of LIR class names which stop the descend into the child nodes of an attributed node
 

visibility

visibility

Type: set[RoutineCategory]

Default: {'Non-static Function', 'Public Method'}

Restrict affected methods to those matching one of the selected visibilities, e.g. affect only public methods.
 

Option Types

These types are used by options listed above:

RoutineCategory

Routine categories for config options.
 
  • Static Function

  • Non-static Function

  • Public Method

  • Protected Method

  • Private Method

  • C# Internal Method

  • C# Protected Internal Method

  • C# Protected Private Method