eteran / edb-debugger

edb is a cross-platform AArch32/x86/x86-64 debugger.
GNU General Public License v2.0
2.7k stars 326 forks source link

fix a bug that symbols aren't loaded when executable path contains whitespace #754

Closed sorokin closed 4 years ago

sorokin commented 4 years ago

When program with whitespace in its path is run, edb prints the warning:

WARNING: File "/home/ivan/.cache/codef00.com/edb/symbols//home/ivan/My Documents/hello.map" seems corrupt

and the list of symbols is empty.

The bug is caused by the fact that the file path is read with istream::operator>> that stops reading at first whitespace. This commit uses std::getline to read the line fully.