comportamento estranho quando a depuração Eclipse CDT com Eclipse Debugger

Sadik:

Quando a depuração de código Eclipse CDT eu testemunhei um comportamento estranho. Eu tento explicar isso com screen-shots. Estou pessoas certeza que não sabem CDT ainda pode me dar uma resposta a esta pergunta, porque eu acho que está relacionado com (depuração) de código Java com Eclipse em geral.

O IIndexFile fileque você vê na linha realçada terá um campo com um valor errado e eu tento entender onde esse valor vem.

Antes de entrar getFile():

getFile () será chamado

Dentro de getFile()uma nova PDOMFileé criada. O construtor com dois parâmetros é chamado:digite descrição da imagem aqui

Shortly before leaving the constructor we can see on the right side that location is null. Not surprising, as it hasn't been set yet. digite descrição da imagem aqui

The next image shows the first thing that surprises me a bit. When leaving the constructor for PDOMFILE I actually expect the debugger to tell me the return value. Instead it says No explicit return value. Maybe it's because it was a constructor or maybe it's because of the if-statement. digite descrição da imagem aqui

Now the highlighted line shows that the dubber is back from the call getFile(), but the assignment to file hasn't been done yet. We can see that the location field is still null. digite descrição da imagem aqui

And this is what I don't understand. Why is location from file set now?

digite descrição da imagem aqui

HighCommander4 :

As chamadas do depurador toString()para obter a seqüência de caracteres exibida no painel inferior da vista "Variáveis". PDOMFile.toString()chamadas getLocation()que define locationem sua primeira chamada.

Acho que você gosta

Origin http://43.154.161.224:23101/article/api/json?id=332636&siteId=1
Recomendado
Clasificación