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

Generate include/capstone/support.h #511

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@radare
Contributor

radare commented Oct 11, 2015

Fix #508

ARCH=$$(echo $$a|tr a-z A-Z); \
echo '#define CS_SUPPORT_ARCH_'$${ARCH} 1 >> $@ ; \
done
echo '#endif' >> $@

This comment has been minimized.

@nplanel

nplanel Oct 12, 2015

Contributor

You should add the API version too, encoded as a flat integer like #define CAPSTONE_VERSION(a,b,c) ((a)<<24+(b)<<16+(c)<<8)

@nplanel

nplanel Oct 12, 2015

Contributor

You should add the API version too, encoded as a flat integer like #define CAPSTONE_VERSION(a,b,c) ((a)<<24+(b)<<16+(c)<<8)

This comment has been minimized.

@nplanel

nplanel Oct 12, 2015

Contributor

What about cmake files ?

@nplanel

nplanel Oct 12, 2015

Contributor

What about cmake files ?

This comment has been minimized.

@radare

radare Oct 12, 2015

Contributor

api version is already available in capstone.h via the MAJOR/MINOR defines

@radare

radare Oct 12, 2015

Contributor

api version is already available in capstone.h via the MAJOR/MINOR defines

This comment has been minimized.

@radare

radare Oct 12, 2015

Contributor

i dont get the point of using cmake here. make is quite legacy and for a simple project like this we dont need cmake or autotools

@radare

radare Oct 12, 2015

Contributor

i dont get the point of using cmake here. make is quite legacy and for a simple project like this we dont need cmake or autotools

@aquynh

This comment has been minimized.

Show comment
Hide comment
@aquynh

aquynh Oct 12, 2015

Owner

make is not well supported outside of *nix world. example is Windows with MSVC. CMake is helpful in such a case.

Owner

aquynh commented Oct 12, 2015

make is not well supported outside of *nix world. example is Windows with MSVC. CMake is helpful in such a case.

@radare

This comment has been minimized.

Show comment
Hide comment
@radare

radare Oct 13, 2015

Contributor

In addition to this check the code that uses a specific arch for capstone should begin with:

#ifdef CAPSTONE_M68K_H
...

this means that the compile-time version of capstone have this include, but this doesn't means that the archive file contains them. So this must be checked using the CS_SUPPORT vars. The problem I see is with the backward compatibility of my approach.

Maybe it will be better to just generate a capstone.h with only the #includes of the archs that have been selected at compile time?

Contributor

radare commented Oct 13, 2015

In addition to this check the code that uses a specific arch for capstone should begin with:

#ifdef CAPSTONE_M68K_H
...

this means that the compile-time version of capstone have this include, but this doesn't means that the archive file contains them. So this must be checked using the CS_SUPPORT vars. The problem I see is with the backward compatibility of my approach.

Maybe it will be better to just generate a capstone.h with only the #includes of the archs that have been selected at compile time?

@radare

This comment has been minimized.

Show comment
Hide comment
@radare

radare Apr 14, 2017

Contributor

this got stuck in time and needs to be rebased, can you reply my questions before spending time in the rebase?

Contributor

radare commented Apr 14, 2017

this got stuck in time and needs to be rebased, can you reply my questions before spending time in the rebase?

@radare

This comment has been minimized.

Show comment
Hide comment
@radare

radare Jul 10, 2017

Contributor

hello? anyone is there?

Contributor

radare commented Jul 10, 2017

hello? anyone is there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment