Skip to content

Commit 487b53e

Browse files
nisargjhaveriiloveeclipse
authored andcommitted
Ignore 'this' by checking the name of the variable
Fix #179, Missing variables when debugging Android apps - While getting the list of variables for a method, we were skipping the first slot assuming it was a reference to this. - Though that is not always the case when testing with Android dex files. - Instead of assuming `this` is at the first slot, check the name of the variable.
1 parent 7a8141c commit 487b53e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MethodImpl.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,7 @@ public List<LocalVariable> variables() throws AbsentInformationException {
561561
int slot = readInt("slot", replyData); //$NON-NLS-1$
562562
boolean isArgument = slot < fArgumentSlotsCount;
563563

564-
// Note that for instance methods, the first slot contains the
565-
// this reference.
566-
if (isStatic() || slot > 0) {
564+
if (!name.equals("this")) { //$NON-NLS-1$
567565
LocalVariableImpl localVar = new LocalVariableImpl(
568566
virtualMachineImpl(), this, codeIndex, name,
569567
signature, genericSignature, length, slot,

0 commit comments

Comments
 (0)