Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clion memory view

Tags:

c++

memory

clion

I can't find a memory view in Jetbrain's clion IDE. Does anybody know to show it (has clion this feature)?

Meant is this: memory view in eclipse

like image 948
Martin Pfeffer Avatar asked Jan 14 '16 23:01

Martin Pfeffer


People also ask

Can CLion detect memory leaks?

Valgrind Memcheck (CLion)Valgrind Memcheck is a tool for detecting memory-usage problems such as leaks, invalid memory access, incorrect freeing, and referencing undefined values.

How much RAM does CLion use?

Currently the RAM usage is stable at ~1 Gb with RocksDB, RapidJson, and ~50 classes.


1 Answers

Memory View has been added to CLion in version 2019.1. To open it, select a pointer variable in the debugger’s variables view and press Ctrl+Enter on Windows/Linux or ⌘Enter on macOS.


In all earlier versions you can use the debugger's command x which is available in both GDB and LLDB. You can choose the debugger via CLion->Preferences->Build,Execution,Deployment->Toolchains->Debugger, and display the Debug window via View->Tool Windows->Debug or it should appear if you start a new debugging session via Run->Debug.

For example, in the Debug window I can eXplore memory starting at the address of a variable i:

(lldb) x &i
0x7fff59dbac58: 00 00 00 00 00 00 00 00 88 ac db 59 ff 7f 00 00  ...........Y....
0x7fff59dbac68: 5e 30 2f 61 ff 7f 00 00 88 ac db 59 ff 7f 00 00  ^0/a.......Y....
like image 50
V-R Avatar answered Oct 01 '22 17:10

V-R