Do I have to do something in the debugger plugin or this is just setup related?
No need to change our debugger plugin code. For me, I just comment out one line in my gdb script file.
That problem doesn't occur when using stl pretty printers loaded gdb-init way.
Do you mean the gdbinit script automatically loaded when GDB started? (Disable the "-nx" option).
For me, if I comment the two line in my custom script:
#from libstdcxx.v6.printers import register_libstdcxx_printers
#register_libstdcxx_printers (None)
Then "info pretty-printer" doesn't show stl pretty printer, but if I uncomment two lines, I get the "already registered" issue.