jevey / idapython

Automatically exported from code.google.com/p/idapython
Other
1 stars 0 forks source link

LocByName() fails on idal64 #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1. Execute 'idal64 -L"logfile.txt"' and open an executable
2. File -> Python Command
3. Enter   LocByName('main')

Calling LocByName in idal64 (on MacOS) gives the following error and traceback:

IDAPython: error executing 'test.py':
Expected an ea_t type
Traceback (most recent call last):
  File "/Applications/idaq64.app/Contents/MacOS/../../../idaq.app/Contents/MacOS/python/idaapi.py", line 355, in IDAPython_ExecScript
    execfile(script, g)
  File "test.py", line 33, in <module>
    clear_fcn_ea = LocByName('main')
  File "/Applications/idaq64.app/Contents/MacOS/../../../idaq.app/Contents/MacOS/python/idc.py", line 1842, in LocByName
    return idaapi.get_name_ea(BADADDR, name)
  File "/Applications/idaq64.app/Contents/MacOS/../../../idaq.app/Contents/MacOS/python/idaapi.py", line 23443, in get_name_ea
    return _idaapi.get_name_ea(*args)
TypeError: Expected an ea_t type
 -> OK

--------------------------------------------------------------------------------
-------------
Python 2.6.1 (r261:67515, Aug  2 2010, 20:10:19) 
[GCC 4.2.1 (Apple Inc. build 5646)] 
IDAPython 64-bit v1.5.0 final (serial 0) (c) The IDAPython Team 
<idapython@googlegroups.com>
--------------------------------------------------------------------------------
-------------

LocByName() should return BADADDR when a name cannot be found. Instead, it 
crashed in the idaapi call.

Original issue reported on code.google.com by jonathon...@gmail.com on 10 Jun 2011 at 8:56

GoogleCodeExporter commented 9 years ago
Please try the latest IDAPython (1.5.2)

Original comment by elias.ba...@gmail.com on 17 Jun 2011 at 11:16

GoogleCodeExporter commented 9 years ago

Original comment by elias.ba...@gmail.com on 4 Jul 2011 at 2:35