Log in

View Full Version : Processor Module absolute address problems


hwnd
November 2nd, 2009, 22:13
Hello,

I'm having a bit of an issue trying to get specific results from IDA's kernel.
Have been fumbling around with an 8bit MCU and am trying my hand at writing a custom proc module. things are working out so far but i'm having issues with printing labels vs. addr

Expected Output in IDA
Code:

ROM:BAB2 jsr LOC_B5DE
ROM:BAB8 jsr LOC_D3BA


but i'm getting absolute addresses instead labels. i am struggling trying to understand why it isn't working correctly. the book i'm following doesn't touch on using labels so I'm hoping someone here could point me in the right direction.

disavowed
November 5th, 2009, 13:06
I think you want set_offset(...) or op_offset_ex(...) or op_offset(...), all in offset.hpp.

hwnd
November 5th, 2009, 15:15
Quote:
[Originally Posted by disavowed;83591]I think you want set_offset(...) or op_offset_ex(...) or op_offset(...), all in offset.hpp.



Maybe I'm still doing it wrong?

I ended up (thanks to _m for pointing this out) something like
Code:

if( get_name_expr(cmd.ea+x.offb, x.n, v, x.addr,buf,sizeof(buf), GETN_APPZERO) <= 0 )
{
OutValue(x, OOF_ADDR | OOF_NUMBER | OOFS_NOSIGN | OOFW_32);
QueueMark(Q_noName, cmd.ea);
break;
}
OutLine(ptr);


the results i get are along the lines of what i'm trying to accomplish here (using labels vs. absolute addresses). seems i've got a few mistakes since I'm seeing labels being used in places they should be.