jevey / idapython

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

insn_t wrapper doesn't allow access to the auxpref structure member #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. idaapi.uana0(idaapi.get_screen_ea())
2. an_insn = idaapi.get_current_instruction()
3. print an_insn.auxpref

What is the expected output? What do you see instead?
A representation of the auxpref member is desired; however, attribute
errors are thrown.

What version of the product are you using? On what operating system?
IDAPython 0.9.0 / Python 2.5.0 on Windows

Please provide any additional information below.
ua.hpp: 399
  union
  {
    ushort auxpref;             // processor dependent field
    struct
    {
      uchar low;
      uchar high;
    } auxpref_chars;
  };

Original issue reported on code.google.com by notforgo...@gmail.com on 11 Dec 2007 at 9:28

GoogleCodeExporter commented 9 years ago
uana0 should read ua_ana0.

Original comment by notforgo...@gmail.com on 11 Dec 2007 at 9:28

GoogleCodeExporter commented 9 years ago
this appears to be fixed in the latest testrelease.  sorry

Original comment by notforgo...@gmail.com on 11 Dec 2007 at 9:31

GoogleCodeExporter commented 9 years ago
The problem is indeed fixed in the latest test builds.

As a side note, you can use cvar.cmd to access the current insn_t structure,
its not needed to call get_current_instruction() anymore:

idaapi.ua_ana0(idaapi.get_screen_ea())
print cvar.cmd.auxpref

Original comment by gergely.erdelyi on 15 Dec 2007 at 9:20