| 306 | } |
| 307 | |
| 308 | void readMapsFromFile(int fd) |
| 309 | { |
| 310 | string file = "/proc/self/fd/" + jalib::XToString(fd); |
| 311 | string mapFile = jalib::Filesystem::ResolveSymlink(file); |
| 312 | |
| 313 | JASSERT(mapFile.length() > 0) (mapFile); |
| 314 | JTRACE("Read Maps from file") (mapFile); |
| 315 | |
| 316 | // No need to lock the file as we are the only process using this fd. |
| 317 | // Util::lockFile(fd); |
| 318 | _do_lock_tbl(); |
| 319 | |
| 320 | jalib::JBinarySerializeReaderRaw maprd(mapFile, fd); |
| 321 | maprd.rewind(); |
| 322 | |
| 323 | while (!maprd.isEOF()) { |
| 324 | maprd & _idMapTable; |
| 325 | } |
| 326 | |
| 327 | _do_unlock_tbl(); |
| 328 | |
| 329 | // Util::unlockFile(fd); |
| 330 | |
| 331 | printMaps(); |
| 332 | } |
| 333 | |
| 334 | const string& getTypeStr() |
| 335 | { |
no test coverage detected