Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse CDT Kepler does not allow "Display as array..."

I am trying to debug a C++ program using Eclipse CDT:

#include <vector>
using namespace std;

int main() {
  vector<int> test (4,100);
  return 0;
}

If I place a breakpoint to debug, and I click "Display as Array..." for my vector variable I get the following error:

(*((test)+0)@4) Error: Multiple errors reported.\ Failed to execute MI command: -var-create - * (*((test)+0)@4) Error message from debugger back end: No symbol "operator+" in current context.\ Unable to create variable object

How can I view the values of my arrays while debugging?

I am using:

  • Eclipse 4.3 (Kepler)
  • Ubuntu 13 64-bit
  • gcc 4.7.3 (compiled with -g3 and -O0)
  • gdb 7.5.91
  • GDB (DSF) Create Process Launcher
like image 747
Neal Kruis Avatar asked May 03 '26 19:05

Neal Kruis


1 Answers

Eclipse can, see the snapshot and the instructions here and here. This post helped me out as well.

like image 103
gg349 Avatar answered May 05 '26 09:05

gg349