Debug android source code

15 views
Skip to first unread message

Yogi

unread,
Dec 5, 2008, 3:50:00 AM12/5/08
to android-porting
Hi All,

I want to debug android codec source code and want to know how the
audio/video graph is build.
Can we debug the codec source code with the help of ADB?
Please help me out.

Thanks in advance,
Yogi

freepine

unread,
Dec 7, 2008, 9:04:44 PM12/7/08
to android...@googlegroups.com
You can turn on the code in /opencore/android/thread_init.cpp (about line  94~103) to enable android log appender. 
And updating the marco of PVLOGGER_INST_LEVEL to 5 in external/opencore/oscl/pvlogger/src/pvlogger.h.

Then you will see PV logs in DDMS.

If you intends to use gdb, you will need to attach to the independent media server process -- a different process than your app.
Message has been deleted

Yogi

unread,
Dec 8, 2008, 8:21:18 AM12/8/08
to android-porting
After enabling the log i am getting following error message:

target thumb C++: libpvlogger <= external/opencore//oscl/pvlogger/src/
pvlogger.cpp
In file included from bionic/libc/include/stdint.h:31,
from bionic/libc/include/dirent.h:31,
from external/opencore/oscl/oscl/config/linux_nj/
osclconfig.h:35,
from out/target/product/generic/obj/include/libpv/
oscl_base.h:38,
from external/opencore//oscl/pvlogger/src/pvlogger.h:
30,
from external/opencore//oscl/pvlogger/src/
pvlogger.cpp:18:
/root/bin/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/../lib/gcc/
arm-eabi/4.2.1/include/stddef.h:152: error: expected constructor,
destructor, or type conversion before 'typedef'
In file included from external/opencore/oscl/oscl/config/linux_nj/
osclconfig_unix_nj.h:45,
from external/opencore/oscl/oscl/config/linux_nj/
osclconfig.h:53,
from out/target/product/generic/obj/include/libpv/
oscl_base.h:38,
from external/opencore//oscl/pvlogger/src/pvlogger.h:
30,
from external/opencore//oscl/pvlogger/src/
pvlogger.cpp:18:
bionic/libc/include/unistd.h:161: warning: 'sbrk' initialized and
declared 'extern'
bionic/libc/include/unistd.h:161: error: 'ptrdiff_t' was not declared
in this scope
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/
libpvlogger_intermediates/src/pvlogger.o] Error 1

I missed something?
Please help me.

Thanks in advance,
Yogi

On Dec 8, 7:04 am, freepine <freep...@gmail.com> wrote:
> You can turn on the code in /opencore/android/thread_init.cpp (about line
>  94~103) to enable android log appender. And updating the marco of
> PVLOGGER_INST_LEVEL to 5 in external/opencore/oscl/pvlogger/src/pvlogger.h.
>
> Then you will see PV logs in DDMS.
>
> If you intends to use gdb, you will need to attach to the independent media
> server process -- a different process than your app.
>

freepine

unread,
Dec 8, 2008, 8:22:28 PM12/8/08
to android...@googlegroups.com
What's your build command?

jasperr

unread,
Dec 15, 2008, 4:20:45 AM12/15/08
to android-porting
Hi Freepine,

Do you have a gdb that can running on the arm device? Or you track
the code in the emulator?

The android use bionic libc other than gnu libc. Can a gdb or gdb
server be built to run on an android ARM device?

Thanks
Jasperr
Reply all
Reply to author
Forward
0 new messages