I was debugging a C++ program in the gdb debugger and tried to access the 5th element of vector which only contains 4 element. After trying this error was on the screen:
(gdb) list main
1   #include <memory>
2   #include <vector>
3   
4   int main(int argc, char *argv[]){
5   
6   
7       std::vector<int> v_num = {1, 3, 5, 67};
8       std::unique_ptr<std::vector<int>> p(&v_num);
9   
10  
(gdb) p v_num.at (5)
Python Exception <class 'IndexError'> Vector index "5" should not be >= 4.: 
Error while executing Python code.
(gdb) 
I didn't except to see a Python exception inside the the gdb. Can someone explain why I encountered such error? Does gdb uses python internally?