Regarding gcov using arm-eabi toolchain

by Manish Sharma » Wed, 08 Dec 2010 16:28:03 GMT

Sponsored Links
 Dear All,

We have developed an application for which we would like to check the code
We have used gcov available in android toolchain.

In our file we have added the following LOCAL_FLAGS and included
the libgcov static library.

LOCAL_CFLAGS:= -fprofile-arcs -ftest-coverage


We got some compilation issues which was resolved by copying the libgcov
library from
using BUILD_PREBUILT make rules.

The output executable size is also increased with this and in out folder was
can see *.gcno files getting created.

When we execute the test *.gcda files are generated on target but when we
try to take the code coverage using lcov it is not generating the code
coverage report.

lcov --directory code_coverage/ --capture --output-file ./
genhtml -o code_coverage/ ./

We have tested the same setup with arm-linux toolchain and it works fine.

Please provide some pointer which we can look into.



Other Threads

1. Keyboard confusion

Since there is no on-screen virtual keyboard built into Android, I am
confused about how to plan for text entry.  Let's assume there is a
screen with a EditText field requiring user input.  On the iPhone it
works simply by a virtual keyboard popping up when the field has
focus.  How should an Android app handle this?  With the HTC G1 phone
I assume the user would have to rotate the phone and open the keyboard
to type (cumbersome for minor text entry).  Now, does the rotation and
screen going into landscape mode mean the app is forced into the
onCreate/onResume cycle requiring a complex saving/restoring of app
state just to enter information?  Or is the orientation flip handled
by Android transparently without the app having to do anything... the
screen dimension is just changed and redrawn accordingly?

Really confused about this and haven't found any definitive
explanation yet.

2. I want to know a button's width before it is drawn on the screen! possible?


You can use a ViewTreeObserver. Look at the documentation of the 
android.view.View class for more information.

Hello everyone!

I need a bit of help for an app I am trying to develop.

I've got a main screen with a couple of buttons on it.

What I would like to do is get the width of those buttons before they
are actually drawn on the screen. Their width is variable, as theyr
are defined as "wrap_content" in my main.xml

I tried to get the buttons' width in the methods onCreate() and
onStart() but all I get is a 0 measure, obviously because their width
can't be measured yet.

Do you know a way to do that?

this is an example of the code at the moment :

public void onCreate(Bundle savedInstanceState) {

int maxButton; // I save the biggest button width in this variable

Button testButton = (Button)findViewById(; // button 1
Button testButton2 = (Button)findViewById(; // button 2
Button testButton3 = (Button)findViewById(; // button 3

maxButton=testButton.getWidth(); // I put button 1's width into
if(testButton2.getWidth() > maxButton) { // If button 2's width is
maxButton = testButton2.getWidth(); // maxButton gets button 2's width
testButton3.setText("Button 2 is bigger than button 1!");
testButton3.setText("Button 1 is bigger than button 2!");


Thanks a lot,


3. SAXParser reports different name on SDK 0.9 from SDK 1.0

4. KeyListener doesn't see enter key?

5. Latest SDK, Apps will NOT Run - Errors;

6. how to add data from textbox to database?

7. Install Google Android SDK on Ubuntu