how to build library without optimization in order to properly debug it

by dmitry » Fri, 13 Mar 2009 01:43:13 GMT


Sponsored Links
 hi,

I'm trying to debug native library (in particular, libril.so).
Everythig is going fine, breakpoint is being hit, I can go thru the
lines of RIL_onRequestComplete() function. But when I tried to print
out particular struct I got,

(gdb) print pRI
$2 = <value optimized out>
(gdb) print pRI->pCI
$3 = (android::._115 *) 0x613
(gdb) print pRI->pCI->requestNumber
Cannot access memory at address 0x613

I suspect it could be due to optimization done by compiler. But when I
tried to add,

LOCAL_CFLAGS := -g3 -O0

into makefile of the lib, I've got another problem when I cannot
correctly set breakpoint on desired function. Instead of correct one,

(gdb) break RIL_onRequestComplete
Breakpoint 1 at 0xae402e4e: file hardware/ril/libril/ril.cpp, line
1800.

I got,

(gdb) break RIL_onRequestComplete
Breakpoint 1 at 0xffffab44: file bionic/libm/src/s_tanf.c, line 42.

Does anybody know what could be a problem, and what is the right way
to handle this?

--
Dmitry

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. ViewGroup, Views and Animation

Hi,
I have a few views and animations and I need to figure out a way to
package them so I can use them throughout my app. I thought I should
be able to use ViewGroup, however, things are getting a bit
complicated as my animations need to repeat and to achieve that I have
applied the technique with an AnimationListener posting to a Runnable
when the animation stops so it plays again in a loop. Also they all
have different startOffset values, and I'm not sure how a ViewGroup
can handle that as well. What is the best practice for hadnling
multiple views and animations? Thanks.
--~--~---------~--~----~------------~-------~--~----~

2. how to preload an application

Dear all,
   i am finding all android preloaded applications are located under /
system/app/. So i am wondering if there is way that we can preload our
own applications. Does it work that we just placed an app under /
system/app/?

--~--~---------~--~----~------------~-------~--~----~

3. MediaPlayer not running - just blank screen

4. How to mount the microSD disk programmatically?

5. queries about libgps.so and libhardware.so

6. When is SDK based on cupcake getting released

7. OutOfMemoryError BitmapFactory.nativeDecodeByteArray inside Threads