When running a remote debugger to a linux server, is there a way to get IDA (7.0) to properly handle strings? When I go to the pseudocode view, I get things like this;

v7 = sub_804AD60((std::string *)&v16);
char *v5;

So clearly IDA has some handling of string types, and it's able to infer that one of these is a C++ string and the other a pointer to a C string. What I can't figure out is how to get that string? I've been searching for a locals window or something in the debugger with no luck, and hovering over v16 gets an int v16 with a memory address value. Surely there's some way to just get the actual string value of v16 or v5 in plain old ASCII or UTF-8 without having to dig it out of the hex view?

  • Hi and welcome to RE.SE! For v5 you should be shown the value, but for something like a std::string it depends. I have IDA, but not the HexRays plugin, so I can't be of much help here. – 0xC0000022L Oct 31 '18 at 21:15
  • Sometimes, we've to guess the data type. You can get the data type while debugging. Then press Y to change it. – Biswapriyo Oct 31 '18 at 21:25
  • The datatype is spot-on, it's 100% an std::string, but that string -- Hello World\0, should be somehow visible to me, and yet I can't find a way. – XeroxDucati Nov 1 '18 at 0:23
  • Locate a cursor on v16, press <kbd>Y</kbd>, enter std::string, press enter. – w s Nov 1 '18 at 7:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.