4

I'd like to see elements of vector in NetBeans with cygwin toolchain. There are some instructions, but it is not clear how to apply them to cygwin. Did anyone have positive experience with it?

Thanx.

Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206

1 Answers1

0

On Windows 10, with Netbeans 8.2 and cygwin64:

  • check if libstdc++ is installed (using cygwin 'setup-x86_64.exe')
  • download the scripts at
    https://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python/libstdcxx
  • copy all folders and files including folder 'libstdcxx' to cygwin. For example:
    c:\bin\cygwin64\usr\share\gdb\python
    (after copying, there should be a file 'printers.py' at the folder: c:\bin\cygwin64\usr\share\gdb\python\libstdcxx\v6

  • open Netbeans project properties/debug and check where it's looking for the Gdb ini file (mine is at c:\users\MYUSER\.gdbinit)

  • create a file .gdbinit at that folder, containing:
    python
    import sys
    sys.path.insert(0, 'c:\bin\cygwin64\usr\share\gdb\python')
    from libstdcxx.v6.printers import register_libstdcxx_printers
    register_libstdcxx_printers (None)
    end

    (attention to the correct sys.path.insert above)

  • rebuild your project. When debugging, the 'Variables' tab will show meaningful info.

Marcos
  • 23
  • 3