debugging,android-ndk,floating-point,arm , fpscr register is not updated when enabling floating point exceptions on arm7, SIGFPE not generated

fpscr register is not updated when enabling floating point exceptions on arm7, SIGFPE not generated


Tag: debugging,android-ndk,floating-point,arm

fpscr register is not updated and SIGFPE is not generated. This was tested on an NVidia Shield Tablet and a 1st gen Nexus 7.


The implementation calls code, which eventually executes this assembly:

  asm _volatile__("vmsr fpscr,%0" : :"ri" (fpscr));
  ; disassembly follows
  ldr r3, [r11, #-8] 
  vmsr fpscr, r3

vmsr fpscr does not update. It remains 0x20000010 when it should be updated to 0x20000710.

Tested with -mfloat-abi=soft and -mfloat-abi=softfp.

What can I conclude?


The ARM ARM has this to say about all the exception-trapping bits in FPSCR:

[...]. This bit is RW only if the implementation supports the trapping of floating-point exceptions. In an implementation that does not support floating-point exception trapping, this bit is RES0.

The Tegra K1 SoC in the SHIELD Tablet has Cortex-A15 CPUs, which don't support VFP exception trapping.

The Tegra 3 SoC in the original Nexus 7 has Cortex-A9 CPUs (with the VFP+NEON implementation), which don't support VFP exception trapping

What is particularly unhelpful is that from userspace you can't even access the MVFR0 feature register to find this out programatically.

I think you can only conclude that you don't have any hardware which supports trapped exceptions ;)


C++ Have lone executable log exceptions?

I'm currently in a beta testing phase of my C++ Server. I'm sending it out to users to stress test it to see if an exceptions show up. However, since the .exe is a standalone, how do I make it so it automatically creates a dump or a log of...

Native Code: cannot use typeid with -fno-rtti

I'm trying to build native code on android because I want to use VTK for my android tablet. However, I am facing some issues when it comes to building one of the vtk examples. I know this problem has been covered here for an objective c issue but I guess...

Print output of a Theano network

I am sorry, very newbee question... I trained a neural network with Theano and now I want to see what it outputs for a certain input. So I can say: test_pred = lasagne.layers.get_output(output_layer, dataset['X_test']) where output_layer is my network. Now, the last layer happens to be a softmax, so if...

ASP.NET strange behaviour: Adding Debug=true in web.config changes css

Just as the question states: When I add debug=true to my web.config (no other changes anywhere in the code) my page is rendered with no background colour. Any explanation why this should occur?...

OpenGL framebuffer android without GL_OES_packed_depth_stencil (on Nexus 7 2012)

How do I init the framebuffer with depth and stencil on a device which does not support GL_OES_packed_depth_stencil (In my case a Nexus 7 2012)? This does not work: glGenRenderbuffers(1, &depthStencil); glBindRenderbuffer(GL_RENDERBUFFER, depthStencil); glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, width, height); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthStencil); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, depthStencil); GLenum status =...

Can't find out how button click event got wired

I have a button which posts back through Ajax. I tried to find out what code executes when the button is clicked. I used Visual Event (screen capture below) to see how the event was bound but the info didn't help me enough. Then I set an event listener breakpoint...

Can somebody explain why this is the result? [on hold]

public boolean isNumber(String s) { String a = s.trim(); if(a == null || a.isEmpty()){ return false; } boolean dFlag = false; boolean eFlag = false; boolean nFlag = false; for (int i = 0; i< a.length();i++){ char c = a.charAt(i); if (c == '+' || c == '-'){ if (i...

Android : Loading pre-built library - Circular dependency dropped

I am trying to import a module into my project. in module: LOCAL_PATH := $(call my-dir) include $(CEAR_VARS) LOCAL_MODULE := fromhere1 LOCAL_MODULE_FILENAME := fromhere1 LOCAL_SRC_FILES := $(TARGET_ARCH_ABI)/ include $(PREBUILT_SHARED_LIBRARY) is built by ndk-build in my project: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := native LOCAL_MODULE_FILENAME :=...

How to drill down into shared_ptr [Netbeans, clang++, gdb]

I'm using Netbeans C++ 8.0.2 clang++ (Ubuntu clang version 3.6.0-2ubuntu1 (tags/RELEASE_360/final) (based on LLVM 3.6.0)) gdb (GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9) In my "C++ Simple Tests," whenever I inspect a variable that is a shared_ptr, all I see for value is: std::shared_ptr (count 1, weak 0) 0x64d3a0 or similar. There...

Why am I getting a debug assertion failed error on running the code

When I enter a password in my program below and press enter I get a debug assertion error, specifically isctype.c line 56 Expression:(unsigned)(c+1) <= 256 Could someone help me get around this please? Code: int main() { int j=0; char pass[100]; int upper=0, lower=0, digit=0, sc=0; printf("Enter your password:\n"); scanf("%s",&pass);...

Outputing logs to Console in Android

I'm using the command line to build a project that I am working on: I use it to generate an APK, transfer it to my device, and then run it in on my device. I am trying to debug this application now, and I am not sure how to go...

Install Android app on device through wifi - no usb or emulator

Just as it says in the title. It seems my smartphone data connectors are broken, and the emulators run far too slow on my computer (surprisingly because it is i7). So, is there any way I can use an alternative to usb debugging through WIFI instead of usb? ...

What am I doing wrong in my coin flip code?

I am trying to write a program that flips a coin, and displays Heads or Tails accordingly. This is what I have: from random import random while True: for i in range (2): spin = i.random() if spin == 0: print ("Heads") else: print ("Tails") but I keep getting the...

Print addresses of all local variables in C

I want to print the addresses of all the local and global variables which are being used in a function, at different points of execution of a program and store them in a file. I am trying to use gdb for this same. The "info local" command prints the values...

What does the double colon mean in Scope Local variables in Chrome's debugger?

See the screen dump fragment below. Notice that there are two colons between legend and Object (legend is a field of ptd). What does the double colon mean? My problem is that if I test the value of ptd.legend, it is 'undefined'. Which it shouldn't be... ...

Errors trying to add rectangles to JPanel

I am trying to draw a grid of rectangles on a JPanel that already has a few JButtons on it. I get a big list of errors when I try to run it. Here's my code: package GameOfLife; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.*;...

VBA Debugger shows only 256 elements of a collection

the title explains my problem. Im working on an excelmakro and my questions is, is there an option that the debugger shows all elements like it does with an array? And if not, is the only workaround the storage of my classobjects in an array after inflating the collection? I...

How to convert Solaris MDB addresses into file names and line numbers?

Say you have a MDB stack trace that look like this:`vmem_seg_alloc+0x170`vmem_xalloc+0x628`vmem_alloc+0x1f8`umem_alloc+0xec`malloc+0x40 compute+0x14 main+0x54 _start+0x12c For example a stack trace that is generated when applying ::vmem_seg -v to an address that is listed by ::findleaks. The corresponding binary has debugging symbols included, thus it should be...

Debug java in brackets editor or Visual Studio Code

I really hate the IDE. They are too heavyweight and add a bunch of IDE specific files and folders and whatnot when creating a project. For the sake of making things easier, I use code editors. My favourite are Brackets (found at this site) and microsoft's cross platform Visual Studio...

Suggestions for my Selection Sort / Java

My Selection Sort algorithm is not working. I am getting the following errors: //Exception in thread "main" java.lang.NullPointerException Note: this is for a java class. I do not have a lot of experience. I am done with the assignment. I am trying to understand the reason why my sorting algorithm...

Codecademy “SyntaxError: Unexpected token else”

I'm doing the codecademy js course, and I'm at the part with rock paper scissors. When I save the code it says "SyntaxError: Unexpected token else". What did I do wrong? This is my code: var compare = function(choice1, choice2) { if (choice1 === choice2) { return("The result is a...

Android armeabi devices with API level 15+

I'm developing an app for API level 15+ that has some jni code and i'm wondering if there are devices with armeabi ABI (ARMv5) and API level 15+ Can i include only armeabi-v7a and x86 libraries and skip the old armeabi?...

Debugging service test client: Netbeans debugger won't recognize Glassfish server

Here's what I've done so far: Did a fresh build of project (web service project). Redeployed project war file to Glassfish server. Restarted server with --debug=true. Attached debugger from Netbeans. Debugger attaches to the server without an error (responds "User Program Running"), however the Debug tab (in the Projects/Files/Services window)...

Debugging a SQL command in c#

So below I have a piece of code that I have been working on: SqlConnection connect = new SqlConnection("Server=OMADB01;Database=PATRICK_DEV;Trusted_Connection=True;"); connect.Open(); SqlCommand command = new SqlCommand("UPDATE FILE_DATE_PROCESSED SET FILE_DATE_PROCESSED = DATE_ENTERED, DATE_ENTERED = GETDATE() SELECT top 1 FILE_DATE_PROCESSED, DATE_ENTERED FROM FILE_DATE_PROCESSED, ORDER BY DATE_ENTERED DESC ", connect); SqlDataReader reader = null;...

BSTD inorder traversal produces erroneous behaviour

I have a BSTD implementation which is inserting values incorrectly and I can't find for the life of me what is going on. EXPECTED ACTUAL -------- ---------- Alex Janice Carlos Janice Elton Janice Janice Zidane Zidane Zidane Implementation private Node<K,E> insert(Node<K,E> node, K key, E elem) { if (node ==...

Automatically copy .so files from NDK library project?

Using Android Studio with Gradle 1.2.3. I have an NDK library project A that produces a number of .so files in its own libs folder. Though, I cannot see the reference to this folder anywhere in the build.gradle file. When I reference library A from my app MyApp I...

GET document canceled upon first visit (Chrome)

This is a very strange issue with google chrome that some of my customers are reporting that is happening to them when they first visit my website. Bascially what happens is when they load Chrome for the first time, enter my website domain and press enter. It will load for...

double* android ndk crash

I'm facing a peculiar problem with the android ndk. I'm trying to read a previously stored set of bytes in an unsigned char* readBytes (previous allocated and read from file). The data needs to be interpreted as double. unsigned char* svDataOffset=(unsigned char*)(readBytes+byteCounter); unsigned char* chars=(unsigned char*)(svDataOffset+2); //offset of 2 is...

Firefox Add-Ons: Variable Is Not Defined In Console

I'm developing a Firefox extension. When I run it, I open up the browser console and it says, [name] is not defined. It's in "browser.xul." <?xml version="1.0"?> <?xml-stylesheet href="chrome://Uedit/skin/skin.css" type="text/css"?> <!DOCTYPE Uedit SYSTEM "chrome://Uedit/locale/translations.dtd"> <overlay id="Uedit-overlay" xmlns=""> <script src="Uedit.js" /> <toolbarpalette id="BrowserToolbarPalette"> <toolbarbutton id="Uedit"...

How to pass or declare array members in c?

I developed a program that is supposed to pass the following members of the array of double purchase from the following function: float beverages () { char response; double purchase [8]= {3.50, 3.80, 3.90, 4.20, 4.00, 4.30, 3.00, 3.10}; printf("\nEnter your order: "); scanf("%c", response); if (response == 'l') {...

Debbugging angularjs app without ripple or browser because it uses cordovasqlite plugin

In my AngularJS/Ionic app I use the cordova-sqlite plugin and a local database to store data; I also use a web service to fill the database with data from a remote database. Well, sometimes I get a strange behaviour when I try to get data from the remote database. My...

Eclipse Debugger Hitting Comments, Skipping Actual Code

Using Eclipse Luna Service Release 2 (4.4.2) Build id: 20150219-0600 Java Web app running in Tomcat v8.0 (Gold Copy) I've restarted my Eclipse and its debugger numerous times over the course of several days, this has been happening constantly for a few days now, so this is not some random...

Android NDK error bash: ../../build/intermediates/classes/debug/: Is a director

ubuntu kylin system NDK version r10e SDK version android-22 Details command: javah -d jni -classpath /home/king/ide/android-sdk-linux/platforms/android-22/android.jar;../../build/intermediates/classes/debug/ com.lengking.ndk.MainActivity error :bash: ../../build/intermediates/classes/debug/: Is a director I did not find the answer on the Web

How to upscale and render remote(RGB565) frame buffer on Android native?

I have ported remote frame buffer receive C code on Android 4.2.2 which receives frame buffer from host in RGB565 format. Able to render the received framebuffer following the standard android example frameworks/native/services/surfaceflinger/tests/resize/resize.cpp. Following is the code snippet used sp<Surface> surface = client->createSurface(String8("resize"), 800, 480, PIXEL_FORMAT_RGB_565, 0); SurfaceComposerClient::openGlobalTransaction(); surface->setLayer(100000); SurfaceComposerClient::closeGlobalTransaction();...

Error messages and console logs in Electron?

How do you view error messages and console logs in Electron during development? Also, is it possible for the logs to be written directly into a file? Edit: Kind of like the errors and console logs displayed by Chrome's dev tools: Except in Electron rather than Chrome....

Error for cv::FileStorage in JNI

I am getting errors while compiling my native.cpp file in Eclipse ADT/NDK. While compiling the following lines of code FileStorage storage(nativepath, FileStorage::WRITE); storage << "img" << mat; storage.release(); The errors are D:/androidworkspace/Augmented-Reality//obj/local/arm64-v8a/objs/ndksetup/native.o: In function Java_com_shahrukh_AugmentedReality_CAMShiftDetection_savemat(_JNIEnv*, _jobject*, long long, _jstring*)': D:\androidworkspace\Augmented-Reality/jni/native.cpp:14: undefined reference...

Perl Debugging Using Flags

So my goal is to find an easy way to turn on print statements in Perl a flag. In C/C++ you can use a #define to choose if certain code is run and it is a way to turn on and off debug print statements. Where if a #define DEBUG...

How to make android NDK work in windows?

I have downloaded android-ndk-r10e & I have also setted path in environment variable as well as NDK path for eclipse. I was able to build and run HelloJni sample app from eclipse, but when I use console to build it says 'ndk' is not recognized as an internal or external...

Visualise CSS selectors like :read-only in debug (F12 tools)

Having :read-only, [readonly] { background-color: aliceblue; } <form> <h2>test</h2> </form> How can I detect, when debugging, say, in Chrome, that the h2(or form) field has an :read-only property (or other type of selector, like :disabled, etc.) set to true? PS. To clarify the question: the question is not about a...

How can I debug scala.js unit tests?

I have some scala.js unit tests written in utest. They all run just fine from the sbt build, however I would like to be able to step through the unit tests in a debugger. Using my favorite IDE (intellij) to debug the tests won't work because it will try to...

What is this error about perllocale in Perldoc?

I was discussing here about setting no locales in Perl and was recommended to run this perldoc perllocale in OSX Yosemite 10.10.3 but I get the error: Error while formatting with Pod::Perldoc::ToMan: at /System/Library/Perl/5.18/Pod/ line 1346. at /usr/bin/perldoc5.18 line 11. Got a 0-length file from /System/Library/Perl/5.18/pods/perllocale.pod via Pod::Perldoc::ToMan!? at /usr/bin/perldoc5.18...

iOS app crash on launch using XCode debugger, runs fine without debugger

When running the app on a device (iphone), it crashes at startup without any error messages. But if the device is not connected to xcode (not in debug mode), just open up the app, it runs fine. Same code runs perfect on simulator. Never seen this before, I guess something...

Rails 4 + delayed job - constantly writing debug code to production logs

I'm using delayed job for the first time, and it seems to be working fine. I started to tail my production log to fix another issue, and found that delayed job is constantly updating the production log with debug code. Is this normal, and can I turn it off? [2015-06-14T16:05:35.983383...

Java Reflection vs Java Debug Interface (JDI) [closed]

What are the differences between use Java Reflection and Java Debug Interface? when can I use one and when the other?

I cannot debug two projects at once - one with Resharper NUnit tests

My team has a solution with multiple projects. One of these projects is an ASP.NET MVC website. Another project contains NUnit tests. We launch these NUnit tests inside Visual Studio 2013 with Resharper 8.2.2. Another developer on my team is able debug both the MVC project and the NUnit tests...

iOS how to programmatically read device's screen auto-lock timeout time?

I'm creating a method to send debug info to the support team for one of my apps. I have method calls like these: NSString* appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; NSString* build = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];; NSString* iOSVersion = [[UIDevice currentDevice] systemVersion];; An additional requirement is to understand how our internal...

AngularJS: UI-Router blank page debug

I just wondering does anybody know how to debug situation when you have blank page for UI-Router. (Of course, without any errors in console) By doing console.log for router events(take from here) I found you that it went to correct state but after did not stop on breakpoint inside state...

Once I turn off debuggingData in angular, is there another way to get the rootscope?

I think having debugging info on by default in Angular will sink large apps. You can now disable this in production: But there are some cases where I do: angular.element(document).scope() in order to access the rootScope. Is there another way in angular to get the $rootScope without this debugging...

Concurrent modification exception when using iterator? (Java)

I am trying to write code for the simulation WaTor in which sharks and fish eat each other and simulate population control etc. Anyways, the problem I am having is that i keep getting a concurrect modification exception even when using an iterator. Here is my code: private void updateSharks()...

What are my next steps on finding the cause of this exception?

I'm fairly new to Eclipse, Java, and Android programming. I've taken over development of an Android application. Someone has made a change several months ago that is causing the application to crash (exception) in code that is not part of the application code. I don't have any idea where or...