mirror of
https://github.com/radareorg/r2ghidra.git
synced 2026-11-07 06:25:57 -10:00
More Windows Fixes
This commit is contained in:
7 files changed
+26
-8
No files matched your search
@@ -46,7 +46,8 @@ if(WIN32)
|
||||
socket
|
||||
fs
|
||||
magic
|
||||
crypto)
|
||||
crypto
|
||||
sdb)
|
||||
|
||||
set(Radare2_LIBRARIES "")
|
||||
set(Radare2_LIBRARIES_VARS "")
|
||||
|
||||
@@ -20,4 +20,8 @@ if(APPLE)
|
||||
target_link_options(r2ghidra_cutter PRIVATE -undefined dynamic_lookup)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_options(r2ghidra_cutter PRIVATE -FORCE:UNRESOLVED)
|
||||
endif()
|
||||
|
||||
install(TARGETS r2ghidra_cutter DESTINATION "${CUTTER_INSTALL_PLUGDIR}")
|
||||
@@ -206,10 +206,12 @@ if(BUILD_SLASPECS)
|
||||
file(MAKE_DIRECTORY "${SLEIGH_BASE}")
|
||||
foreach(slaspec ${SLASPEC_FILES})
|
||||
get_filename_component(sleigh_name "${slaspec}" NAME_WE)
|
||||
get_filename_component(sleigh_dir "${slaspec}" DIRECTORY)
|
||||
set(sla_file "${SLEIGH_BASE}/${sleigh_name}.sla")
|
||||
add_custom_command(OUTPUT "${sla_file}"
|
||||
COMMAND sleighc "${slaspec}" "${sla_file}"
|
||||
MAIN_DEPENDENCY "${slaspec}")
|
||||
MAIN_DEPENDENCY "${slaspec}"
|
||||
WORKING_DIRECTORY "${sleigh_dir}")
|
||||
list(APPEND SLAFILES "${sla_file}")
|
||||
endforeach()
|
||||
add_custom_target(sla ALL DEPENDS ${SLAFILES})
|
||||
|
||||
@@ -27,8 +27,8 @@ void AnnotateOpref(ANNOTATOR_PARAMS)
|
||||
pugi::xml_attribute attr = node.attribute("opref");
|
||||
if(attr.empty())
|
||||
return;
|
||||
unsigned long long opref = attr.as_ullong(ULONG_LONG_MAX);
|
||||
if(opref == ULONG_LONG_MAX)
|
||||
unsigned long long opref = attr.as_ullong(ULLONG_MAX);
|
||||
if(opref == ULLONG_MAX)
|
||||
return;
|
||||
auto opit = ctx->ops.find((uintm)opref);
|
||||
if(opit == ctx->ops.end())
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
|
||||
#include <r_types.h>
|
||||
|
||||
// Windows defines LoadImage to LoadImageA
|
||||
#ifdef LoadImage
|
||||
#undef LoadImage
|
||||
#endif
|
||||
|
||||
class R2Architecture;
|
||||
typedef struct r_anal_function_t RAnalFunction;
|
||||
typedef struct r_flag_item_t RFlagItem;
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
#include "R2TypeFactory.h"
|
||||
#include "R2Architecture.h"
|
||||
#include "R2Utils.h"
|
||||
|
||||
#include <r_parse.h>
|
||||
#include <r_core.h>
|
||||
|
||||
#include "R2Utils.h"
|
||||
|
||||
R2TypeFactory::R2TypeFactory(R2Architecture *arch)
|
||||
: TypeFactory(arch),
|
||||
arch(arch)
|
||||
@@ -69,9 +70,9 @@ Datatype *R2TypeFactory::queryR2Struct(const string &n)
|
||||
memberType = getTypeArray(elements, memberType);
|
||||
|
||||
fields.push_back({
|
||||
.offset = offset,
|
||||
.name = memberName,
|
||||
.type = memberType
|
||||
offset,
|
||||
memberName,
|
||||
memberType
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
#include "R2Architecture.h"
|
||||
#include "CodeXMLParse.h"
|
||||
|
||||
// Windows clash
|
||||
#ifdef restrict
|
||||
#undef restrict
|
||||
#endif
|
||||
|
||||
#include <libdecomp.hh>
|
||||
#include <printc.hh>
|
||||
#include "R2PrintC.h"
|
||||
|
||||
Reference in new issue
Block a user