User forums > Using Code::Blocks

How can i show an address of a variable in an easy way?

(1/1)

ledi001:
Hi,
i am not so familiar with code::blocks and i want to see the address of an existing variable.
What i found out is when i select a variable and choose with a right mouseklick "Examine memory" then i will find the address of this variable like in the attached image in the Memory window. In this case, the address of a = 0x407000 with a value of 4.

But is there no easier way to find out the address of a variable? Maybe in a column in the watch window?

oBFusCATed:
Have you tried to type &myvariable and press enter in the watches window in an empty row?

ledi001:
Thank you for that hint!
It works  :)

But is there a way that i can show the address of a variable automatically in a separate column in the watch window?

oBFusCATed:
No, there isn't. It could be added, but it will slow the current debugger quite a bit.
Also the info for addresses is not that useful most of the times and when it is useful there is a way to achieve it.

Navigation

[0] Message Index

Go to full version