PDA

View Full Version : Processor Module absolute address problems


hwnd
11-02-2009, 10:13 PM
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
11-05-2009, 01:06 PM
I think you want set_offset(...) or op_offset_ex(...) or op_offset(...), all in offset.hpp.

hwnd
11-05-2009, 03:15 PM
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.