Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between this and this@entry?

I've recently started to use Eclipse-CDT and was curious about 'this' and 'this@entry' in the variables window in the debugging perspective. They both have the same memory address and look identical but then why include both? Is 'this@entry' meant to represent the state of 'this' at some breakpoint within a function? Do the values represented under 'this@entry' go out of scope, so to speak, and update 'this' when the function returns?

They both have the same memory address but...

team1,2 and currentMatch are global variables to the class I am debugging, and the breakpoints are in a member function of that class.

like image 216
D_________ Avatar asked Oct 15 '13 16:10

D_________


1 Answers

The @entry form refers to the value of the parameter when the function was entered. This isn't always available, but sometimes it is -- there is a DWARF extension for it, and GCC emits this when possible.

There's some information here:

https://sourceware.org/gdb/onlinedocs/gdb/Variables.html

IIRC in gdb's CLI we decided on a format that only shows "@entry" in backtraces when it differs from the current value. But MI (what Eclipse uses) is different and from what you say it seems to always show it.

like image 75
Tom Tromey Avatar answered Nov 13 '22 21:11

Tom Tromey