Don't emit locals with empty ranges in the locals table D8 cannot encode parameters with generic type in the header. It instead encodes a null parameter with an empty range in the header and follows it up with a START_LOCAL_EXTENDED to actually encode the parameter. ART used to emit both the null with an empty range and the actual variable. This confuses debuggers. So don't emit the parameters with empty ranges. Also extend a test to test for these cases. Bug: 297843934 Test: art/test.py -t 1911 (cherry picked from https://android-review.googlesource.com/q/commit:feab9298ac25925d6c943b259cfb6537b123d85f) Merged-In: Ib2e783079db298ffd842b8f373b8bad80251ba3b Change-Id: Ib2e783079db298ffd842b8f373b8bad80251ba3b