@rtype: str @return: Module name, as used in labels. @warning: Names are B{NOT} guaranteed to be unique. If you need unique identification for a loaded module, use the base address instead. @see: L{get_label}
(self)
| 325 | return modName |
| 326 | |
| 327 | def get_name(self): |
| 328 | """ |
| 329 | @rtype: str |
| 330 | @return: Module name, as used in labels. |
| 331 | |
| 332 | @warning: Names are B{NOT} guaranteed to be unique. |
| 333 | |
| 334 | If you need unique identification for a loaded module, |
| 335 | use the base address instead. |
| 336 | |
| 337 | @see: L{get_label} |
| 338 | """ |
| 339 | pathname = self.get_filename() |
| 340 | if pathname: |
| 341 | modName = self.__filename_to_modname(pathname) |
| 342 | if isinstance(modName, compat.unicode): |
| 343 | try: |
| 344 | modName = modName.encode("cp1252") |
| 345 | except UnicodeEncodeError: |
| 346 | e = sys.exc_info()[1] |
| 347 | warnings.warn(str(e)) |
| 348 | else: |
| 349 | modName = "0x%x" % self.get_base() |
| 350 | return modName |
| 351 | |
| 352 | def match_name(self, name): |
| 353 | """ |
no test coverage detected