Reputation: 208
What do the highlighted numbers example, 4580, 4581 etc., mean? They are not PIDs, this was crossed checked with the ps command in adb shell.
Upvotes: 7
Views: 704
Reputation: 208
In short: The number may not necessarily be the register number, it could be the ID from ObjectReferenceImpl, which is an implementation of ObjectReference interface from Java Debug Interface (JDI).
In length: From analysis of Idea Community code base, ThreadDescriptorImpl.java
(ThreadDescriptorImpl), was found to be the class responsible for providing the thread description to be displayed in the debug window (please refer above image presented with the question). The ID is referred as thread.uniqueID()
. The thread here is of ThreadReferenceProxyImpl
type which extends ObjectReferenceProxyImpl
, where the uniqueID method is implemented. This method in turn returns a uniqueID from an object of ObjectReference
type. Upon cursory search the ObjectReference
definition with satisfying criteria was not found in Idea code base. It was later found to be hidden in the definition of JDI interface. From the JDI implementation jar found in the Idea setup, ObjectReferenceImpl
was found to provide the final implementation of uniqueID
method. The code snippet is listed below -
private long myID;
private static synchronized long nextID()
{
return nextID++;
}
ObjectReferenceImpl(VirtualMachine aVm, Oop oRef)
{
super(aVm);
this.saObject = oRef;
this.myID = nextID();
}
public long uniqueID()
{
return this.myID;
}
However in saying so and answering the question, words like 'probably' and 'may be' were used because, the references for ObjectReference
implementations were not found immediately in the Idea Community edition source code. And, the inferences were from the jar implementations. If direct references were to be provided in the future by someone looking at this question and answer, the answer can be modified to reflect certainty.
Upvotes: 1
Reputation: 1944
This number is the Register number of the register where the Object's reference is stored.
What is register number?
Something completely useless from an app developer point of view! I am sure you know about the Dalvik VM on which android applications run. So, the frames in a Dalvik byte code are made up of registers. And these registers store the object references. Check this link to know more. Not sure why android studio shows them in debugger. I don't see any use of it.
Upvotes: 1