32bit-64bit

Check if any running binary is 32 or 64 bit

房东的猫 提交于 2020-01-05 09:11:44
问题 It is possible to check if an app bundle's binary process is running in 32 or 64 bit mode, as answered in this question, but I can verify that it only works with GUI processes. However, I need to also check processes that don't have a GUI and is not part of a bundle. So, programmatically, without calling system functions or other executables , how can I test if any process is running in 32 or 64 bit mode, given the process pid? 回答1: Ok, so I finally found the answer was already on SO here,

android dev on 64-bit mac

纵然是瞬间 提交于 2020-01-05 04:13:36
问题 I'm considering switching to from PC to Mac but I do Android development. I've read that Android development is only for 32-bit Macs. Is there a way around that problem so that I can continue to do Android development if I buy a 64-bit Mac? Thanks! 回答1: The Android development will be in fact in 32 bits but Mac OS X is intelligent enough to run 64 bits and 32 bits binary on a 64 bits processor. You will not have any problem. 回答2: you could always run a 32 bit instance of windows xp in virtual

Accessing a corrupted shared library

僤鯓⒐⒋嵵緔 提交于 2020-01-04 04:46:10
问题 Here is the code of cpuid2.s : #cpuid2.s view the cpuid vendor id string using c library calls .section .data output: .asciz "The processor Vendor ID is '%s'\n" .section .bss .lcomm buffer, 12 .section .text .global _start _start: movl $0, %eax cpuid movl $buffer, %edi movl %ebx, (%edi) movl %edx, 4(%edi) movl %ecx, 8(%edi) push $buffer push $output call printf addl $8, %esp push $0 call exit I assemble, link, and run it as so: as -o cpuid2.o cpuid2.s ld -dynamic-linker /lib/ld-linux.so.2 -o

How can I detect if GHC is set to generate 32bit or 64bit code by default?

醉酒当歌 提交于 2020-01-03 09:03:11
问题 I have the following bits in my makefile: GLFW_FLAG := -m32 -O2 -Iglfw/include -Iglfw/lib -Iglfw/lib/cocoa $(CFLAGS) ... $(BUILD_DIR)/%.o : %.c $(CC) -c $(GLFW_FLAG) $< -o $@ $(BUILD_DIR)/%.o : %.m $(CC) -c $(GLFW_FLAG) $< -o $@ The -m32 instructs GCC to generate 32bit code. It's there because on some configurations GHC is set to build 32bit code but GCC's default is sometimes 64bit. I would like to generalize this so that it autodetects whether GHC is building 32bit or 64bit code and then

PInvoke c++ dll from c# - An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

不打扰是莪最后的温柔 提交于 2020-01-02 06:55:41
问题 Trying to access an old c++ dll from c# using Dll Import. Been searching around the net for aprox 4 days now without success. I'm trying to use the c++ dll from an asp.net mvc 3 website .net 4. I've changed platform target to x86. I've set "Enable 32 bit application" to true on the application pool in iis. Using Windows Server 2008 R2 with iis 7.5 Is there some way to debug this or get more info about what might be wrong? The link ASP.NET P/Invoke "An attempt was made to load a program with

PInvoke c++ dll from c# - An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

感情迁移 提交于 2020-01-02 06:55:14
问题 Trying to access an old c++ dll from c# using Dll Import. Been searching around the net for aprox 4 days now without success. I'm trying to use the c++ dll from an asp.net mvc 3 website .net 4. I've changed platform target to x86. I've set "Enable 32 bit application" to true on the application pool in iis. Using Windows Server 2008 R2 with iis 7.5 Is there some way to debug this or get more info about what might be wrong? The link ASP.NET P/Invoke "An attempt was made to load a program with

Calling C function which takes no parameters with parameters

时间秒杀一切 提交于 2020-01-02 06:54:10
问题 I have some weird question about probably undefined behavior between C calling convention and 64/32 bits compilation. First here is my code: int f() { return 0; } int main() { int x = 42; return f(x); } As you can see I am calling f with an argument while f takes no parameters. My first question was does this argument is really given to f while calling it. The mysterious lines After a little objdump I obtained curious results. While passing x as argument of f: 00000000004004b6 <f>: 4004b6: 55

Java programing for 64 bit JVM

不想你离开。 提交于 2020-01-02 04:40:13
问题 Few Questions :): How to identify what JVM is currently installed ? (64 bit / 32 bit) Do I need to do some considerations while programming for 64 bit JVM target Platform ? Can my Java code work on 32 bit as well as 64 bit JVM ? How to run my Java App on 64 bit JVM ? How to identify what JVM is being used for my Java App ? 回答1: Normally a 64 bit jvm will identify itself as such. 32/64 bit Considerations I have seen: address space - if you're not expecting to address more that 1.3Gb of memory

32 to 64 bit “Gotchas” in PHP

偶尔善良 提交于 2020-01-02 04:40:09
问题 Last weekend I changed webhosts for my website. The host server I was on was a 32-bit OS and the one I moved to is 64-bit. Unexpectedly, some of my PHP scripts started giving incorrect results. In my case the << and >> (bit shift) operations were the culprit. I ended up having to mask the result with 0xFFFFFFFF and then changing the result if negative for it to work as it did before. Are there any other possible problems in my PHP scripts I should look for? 回答1: It's a high level language, so

How to make JNLP download the correct version of JavaFX 2?

余生颓废 提交于 2020-01-02 04:00:08
问题 JavaFX 2 is highly dependent on native code. For my desktop application, I would like to select the best-matching JavaFX flavor for each supported OS to make the installation on the target systems as painless as possible. Since JavaFX 2 comes with several Ant tasks to help with deployment, I thought this was the way to go, but I seem to have hit a dead end. The deploy task generates a JNLP file which includes a resource reference that calls the JavaFX installer: <resources> <jfx:javafx