Buffer operations should always begin by initializing your output buffer
using the init_output_buffer function. IDA offers a number of OutXXX and out_xxx
functions that send output to the buffer specified in init_output_buffer. Once a line has
been constructed, the output buffer should be finalized with a call to term_output_
buffer before sending the line to the IDA display using the printf_line function.
The majority of available output functions are define in the SDK header file ua.hpp.
Finally, one word concerning building processor modules: while the basic build process
is similar to that used for plug-ins and loaders, processor modules require an additional
post-processing step. The SDK provides a tool named mkidp, which is used to insert a
description string into the compiled processor binary. For Windows modules, mkidp
expects to insert this string in the space between the MSDOS header and the PE header.
Some compilers, such as g++, in the author??™s experience do not leave enough space
between the two headers for this operation to be performed successfully. The IDA SDK
does provide a custom DOS header stub named simply stub designed as a replacement
for the default MSDOS header. Getting g++ to use this stub is not an easy task.
Pages:
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601