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. Zip inflate error while scaning the /system/app

hi fadden,

i get this error only  when i enable the L2 cache on.
With L2 cache off i dont get this error.










-- 
Kishor Lala | ST Microelectronics |  Mobile Platform Application Unit India
 | Bangalore Design Centre |  +91 988 676 3453

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

2. VGA Out (for external monitor/projector)

http://www.bhphotovideo.com/c/product/586388-REG/3M_MPRO110_MPRO110_MICRO_PROFESSIONAL_PROJECTOR.html/BI/1239/kw/3MMPRO110

+ Dev Phone 1

How?

-Dave
--~--~---------~--~----~------------~-------~--~----~

3. MyLocation blinking dot

4. kernel sensor drivers limitation

5. MapsApplication missing from source code?

6. Translators for German, Polish and Spanish

7. Help needed regarding Maps application in Emulator