Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MakeFrame doesn't work for modifying sizes #2

Closed
GoogleCodeExporter opened this issue Mar 22, 2016 · 4 comments
Closed

MakeFrame doesn't work for modifying sizes #2

GoogleCodeExporter opened this issue Mar 22, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant