What does ".line" mean in smali code syntax? (Android-Smali Code) What does ".line" mean in smali code syntax? (Android-Smali Code) android android

What does ".line" mean in smali code syntax? (Android-Smali Code)


.line n markers are used for debugging and stacktraces. When an exception goes uncaught, or the stacktrace needs to be filled in, the line number is taken from the .line statement. If this were missing, then stacktraces would lack line numbers.


Almost everything in the smali language has a direct analogue in the dalvik bytecode or dex format.

The .line directive in particular corresponds to the position entries emitted by the state machine that the debug_info_item defines, as specified at https://source.android.com/devices/tech/dalvik/dex-format.