[Bug gdb/25321] Subtracting two pointers in value history variables gives wrong result

simark at simark dot ca sourceware-bugzilla@sourceware.org
Tue Dec 31 17:55:00 GMT 2019


Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
Bah, nevermind, this is expected pointer arithmetic.  Since these are pointers
to integers, subtracting the two pointers gives the number of integers between
the two pointers:

(0x55555555802c − 0x402c) / 4 = 0x155555555000

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Gdb-prs mailing list