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

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

Sponsored Links

I'm trying to debug native library (in particular,
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,


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

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?



Other Threads

1. Remove Prelink

I'm the newbbie of the group

I heard and I read a lot of think about android prelink, But I want to
remove prelink because
I have to implement Address space layout randomization (ASLR) with
mmap() on android

so when there is prelink and ASLR android dont boot, he don't find any
I tried to put LOCAL_PRELINK_MODULE := false in every libs
but it isn't work
I found the apriori file that make the prelink with prelinkmap.c and

The problem is I don't found where the main.c of apriori is called in
android, I dont clearly understand how works prelink on android.

Can you help me please



2. Socket connection question


Are there any methods which I can use to establish a socket connection that
only use 3G network?

Thank you a lot!



3. options menu problems with SurfaceView and ListView


5. Oot mau tanya milis I'd bada..

6. Authenticating apps sending intents on the receiving en

7. AndroidGroup: Nested Actvities