jevey / idapython

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

MakeFrame doesn't work for modifying sizes #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The IDC MakeFrame method doesn't seem to work for the purposes of modifying
the sizes of the various frame sections (local vars, saved registers,...).

What is the expected output? What do you see instead?
It should either create the frame, or modify an existing frame.

What version of the product are you using? On what operating system?
0.9.54

Please provide any additional information below.
A solution should probably use idaapi.set_frame_sizes().
eg:
def MakeFrame(ea, lvsize, frregs, argsize):
"""
Make function frame

@param ea: any address belonging to the function
@param lvsize: size of function local variables
@param frregs: size of saved registers
@param argsize: size of function arguments

@return: ID of function frame or None
If the function did not have a frame, the frame
will be created. Otherwise the frame will be modified
"""
func = idaapi.get_func(ea)

if not func:
    return None

if idaapi.add_frame(func, lvsize, frregs, argsize):
    return 0
else:
    return idaapi.set_frame_size(func, lvsize, frregs, argsize)

Original issue reported on code.google.com by c1d...@gmail.com on 22 Oct 2007 at 5:29

GoogleCodeExporter commented 9 years ago

Original comment by gergely.erdelyi on 22 Oct 2007 at 5:32

GoogleCodeExporter commented 9 years ago

Original comment by gergely.erdelyi on 22 Oct 2007 at 5:33

GoogleCodeExporter commented 9 years ago

Original comment by gergely.erdelyi on 22 Oct 2007 at 5:34

GoogleCodeExporter commented 9 years ago
Functionality fixed and return values adjusted to match the IDC versions.
Fix is now in Darcs, testing feedback is welcome.

Original comment by gergely.erdelyi on 22 Oct 2007 at 6:43