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

Behzad Gh picture Behzad Gh · Aug 16, 2013 · Viewed 10.6k times · Source

Please take a look at this question

Decompiled smali code contains things like .line 3 or .line 7.

I cannot understand what .line is supposed to be, please elaborate on the usage.

Answer

nanofarad picture nanofarad · Aug 16, 2013

.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.