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

Port to IDA 6.8 SDK. #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ authors

RGL Firmware Loader by TomasVlad

Ported to IDA 6.8 by Martin Heistermann <git () mheistermann.de>

license
~~~~~~~

Expand Down
7 changes: 3 additions & 4 deletions bfin-dis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@ static const char *fmtconst (const_forms_t cf, TIword x, bfd_vma pc, disassemble
if (/*outf->symbol_at_address_func (ea, outf) ||*/ !constant_formats[cf].exact)
{
//outf->print_address_func (ea, outf);
char name[60];

if(get_colored_long_name(pc, ea, name,60))
qsnprintf (buf, 60,"%s", name);
qstring name;
if(get_colored_long_name(&name, ea) && !name.empty())
qsnprintf (buf, 60,"%s", name.c_str());
else
qsnprintf (buf, 60,COLSTR("0x%lx",SCOLOR_NUMBER), ea);

Expand Down
4 changes: 2 additions & 2 deletions blackfin.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include <pro.h>
#include <kernwin.hpp>
#include "../idaidp.hpp"
#include "../module/idaidp.hpp"
#include <fpro.h>

#pragma pack(1)
Expand Down Expand Up @@ -58,7 +58,7 @@ int idaapi blackfin_ana(void);
int idaapi blackfin_emu(void);
void idaapi blackfin_out(void);

bool create_func_frame(func_t *pfn);
bool idaapi create_func_frame(func_t *pfn);

ea_t idaapi get_ref_addr(ea_t ea, const char *str, int pos);

Expand Down
2 changes: 1 addition & 1 deletion emu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void setup_far_func(func_t *pfn)
}
*/

bool create_func_frame(func_t *pfn)
bool idaapi create_func_frame(func_t *pfn)
{
if ( pfn != NULL )
{
Expand Down
10 changes: 5 additions & 5 deletions out.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void idaapi blackfin_out(void)
//Add data references
if(odi.drefmode==DMODE_LOAD_HIGH)
{
char name[MAXSTR];
qstring name;


size_t len = get_max_ascii_length(odi.daddr, ASCSTR_C, true);
Expand All @@ -71,15 +71,15 @@ void idaapi blackfin_out(void)

get_ascii_contents(odi.daddr, len, ASCSTR_C, string, sizeof(string));

if(get_colored_long_name(0, odi.daddr, name,60))
printf_line(0," -> %s => " COLSTR("\"%s\"",SCOLOR_RPTCMT), name, string);
if(get_colored_long_name(&name, odi.daddr) && !name.empty())
printf_line(0," -> %s => " COLSTR("\"%s\"",SCOLOR_RPTCMT), name.c_str(), string);
else
printf_line(0," -> " COLSTR("0x%lx",SCOLOR_NUMBER) " => " COLSTR("\"%s\"",SCOLOR_RPTCMT) , (unsigned long) odi.daddr,string);
}
else
{
if(get_colored_long_name(0, odi.daddr, name,60))
printf_line(0," -> %s", name);
if(get_colored_long_name(&name, odi.daddr) && !name.empty())
printf_line(0," -> %s", name.c_str());
else
printf_line(0," -> " COLSTR("0x%lx",SCOLOR_NUMBER), (unsigned long) odi.daddr);
}
Expand Down
2 changes: 1 addition & 1 deletion reg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static ioport_t *ports;

#define CHECK_IORESP 1 //activate config file reading, thanks to tommie

#include "../iocommon.cpp" //it doesn't look nice, but i think its designated to include it
#include "../module/iocommon.cpp" //it doesn't look nice, but i think its designated to include it


// A well behaving processor module should call invoke_callbacks()
Expand Down
3 changes: 1 addition & 2 deletions rigol_ldr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
L O A D E R for firmware files for Rigol oscilloscope.
*/

#include "../../ldr/idaldr.h"
#include "../ldr/idaldr.h"
#include "rigol_ldr.h"

static rgl_hdr _hdr;
Expand Down Expand Up @@ -145,7 +145,6 @@ loader_t LDSC =
load_rgl_file,
NULL,
NULL,
init_loader_options,
};


Expand Down