| 2001 | |
| 2002 | |
| 2003 | static std::string CheckForLiteralString(uint64_t address) |
| 2004 | { |
| 2005 | bool ok = true; |
| 2006 | bool zeroFound = false; |
| 2007 | std::string result; |
| 2008 | for (size_t i = 0; i < 8; i++) |
| 2009 | { |
| 2010 | uint8_t c = (address >> (8 * i)) & 0xff; |
| 2011 | if (IsPrintableChar(c) && (!zeroFound)) |
| 2012 | { |
| 2013 | result = std::string(1, c) + result; |
| 2014 | } |
| 2015 | else if (c == 0) |
| 2016 | { |
| 2017 | zeroFound = true; |
| 2018 | } |
| 2019 | else if (c != 0) |
| 2020 | { |
| 2021 | ok = false; |
| 2022 | break; |
| 2023 | } |
| 2024 | } |
| 2025 | |
| 2026 | if (ok) |
| 2027 | return result; |
| 2028 | |
| 2029 | return ""; |
| 2030 | } |
| 2031 | |
| 2032 | |
| 2033 | std::string DebuggerController::GetAddressInformation(uint64_t address) |
no test coverage detected