Creating C++ string in GDB

后端 未结 3 1898
我寻月下人不归
我寻月下人不归 2020-12-09 02:55

I\'m having trouble creating an std::string (or any C++ object, I guess) in GDB. I tried lots of variations to the following and none of them seem to work:

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 03:09

    What do you mean by "creating"? GDB doesn't persist C++ objects (your application does that), so you can't create a C++ object in GDB itself.

    However, you should be able to call specific function of your application from GDB.

提交回复
热议问题