|
osdir.com mailing list archive F.A.Q. -since 2001! |
|
|
|
Subject: Re: Debbuging webkit using gdb ? - msg#00212List: android-platform
by Date: Prev Next Date Index by Thread: Prev Next Thread Index
Unfortunately, this isn't published anywhere publicly. Here is how it is done: Debug Native C++ Code: To get meaningful debug info, you do need to build WebCore with - O0. It is simple. Add the following to your buildspec.mk and rebuild webcore and xml2. If you don't have buildspec.mk under the root directory yet, please copy build/buildspec.mk.default to the root (android/) DEBUG_MODULE_libwebcore:=true DEBUG_MODULE_libxml2:=true TARGET_CUSTOM_DEBUG_CFLAGS:=-O0 -mlong-calls Add "ADDITIONAL_BUILD_PROPERTIES += debug.db.uid=100000" so that it will wait for you to connect gdb when crashed. Use "rm out/target/ product/dream/ system/build.prop" to make sure it takes effect. To rebuild webcore and xml2: make clean-libwebcore clean-libxml2 && make Note: If you get system image is too large, you can manually change vendor/htc/dream/BoardConfig.mk, and set BOARD_SYSTEMIMAGE_MAX_SIZE to a bigger number, e.g., 94371840 (sapphire's cap). Debugging native code on emulator is much better now. Start emulator and activate browser. In a different shell, do "gdbclient app_process :5039 browser" It should connect to emulator now, and you should see following (the first three lines) in gdb. Type "c" for continue. __futex_wait () at system/bionic/arch-arm/bionic/atomics_arm.S:121 121 ldmia sp!, {r4, r7} Current language: auto; currently asm (gdb) c Continuing. If you want to use Eclipse, it will be easier if you have Eclipse 3.3 instead of 3.2 (on Mac). Here is how to set up debug configuration. Run -> Debug..., select C/C++ Local Application, then click New. Give a name to your configuration, like release_native, select android project, and android/out/target/product/dream/symbols/system/bin/ app_process for the application. In Debugger tab, select GDB Server for the debugger. Under Debugger Options choose Main tab first, enter android/prebuilt/ darwin-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gdb as GDB debugger. Choose TCP for connection and use 5039 as port. Then under Shared Libraries, add android/out/target/product/dream/ symbols/system/lib. Davidc: Not sure if the is the same for everyone, but I had to reduce the length of the paths to avoid GDB timing out. To do this, remove the paths set in the Source tab, and add the path to the files you are debugging. To debug an application with Eclipse, you need to gdbserver on the target (emulator or hw) and forward the port In a shell, do "adb forward tcp:5039 tcp:5039". In the shell, do "adb shell gdbserver :5039 --attach `pid browser`". Start the debugger in Eclipse If you have trouble to use Eclipse to debug native on Linux, you can use gdb. To use gdb, you need to create a ~/.gdbinit with following content: file ./out/target/product/dream/symbols/system/bin/app_process set solib-search-path ./out/target/product/dream/symbols/ system/lib target remote localhost:5039 It does exact the same thing as Eclipse setup. Then you can start gdb from android/ directory: ./prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-gdb To debug native code before the browser has fully started: Open DevTools application, select Development Settings Select Debug App at the top, and pick the browser from the list (com.android.Browser) Click 'Wait for debugger' Go back to home and launch the browser Follow from step #2 in the steps described above under "Debugging native code on emulator is much better now." At this point, GDB is attached but the browser is still waiting for the Java debugger Attach the Java debugger and the browser will automatically continue --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~---
Thread at a glance:
Previous Message by Date:Re: Building cupcake for dreamDrats, I'm using Ubuntu 9.04. Thanks for your timely response, I'm off to set up a new environment!On Mon, Aug 10, 2009 at 10:09 AM, Jean-Baptiste Queru <jbq@xxxxxxxxxxx> wrote: This is known to happen on some linux systems other than ubuntu 8.04.3. If I remember correctly the build system in cupcake doesn't work with recent versions of bash and/or findutils. I believe that this was fixed in donut and master. JBQ On Sun, Aug 9, 2009 at 9:53 PM, Chad<ccyrowski@xxxxxxxxx> wrote: > > New to this. Have build custom kernel etc over at XDA. Essentially, I > want to make the AOSP r3 and get to the make stage and get the > following error: build/core/main.mk:402: *** No config file found for > TARGET_DEVICE dream-open. Stop. > > I'm familiar with the .config for compiling the kernel, what kind of > config file is it looking for? > > Really appreciate the work you do, and thanks in advance. > > > On Aug 9, 11:38 pm, Jean-Baptiste Queru <j...@xxxxxxxxxxx> wrote: >> 150275 as available on HTC's site is the newest build for the ADP1. >> >> JBQ >> >> On Sun, Aug 9, 2009 at 5:25 PM, The One<m.suss...@xxxxxxxxx> wrote: >> >> > Ok i got it from the newest build. I just used unyaffs and changed the >> > rights. Then I copied it over. Maybe unyaffs should be used generally >> > instead of adb. >> >> -- >> Jean-Baptiste M. "JBQ" Queru >> Software Engineer, Android Open-Source Project, Google. >> >> Questions sent directly to me that have no reason for being private >> will likely get ignored or forwarded to a public forum with no further >> warning. > > > > -- Jean-Baptiste M. "JBQ" Queru Software Engineer, Android Open-Source Project, Google. Questions sent directly to me that have no reason for being private will likely get ignored or forwarded to a public forum with no further warning. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~--- Next Message by Date:Re: How to debug platform code in eclipse?may be you can reference this article:http://blog.michael-forster.de/2008/12/view-android-source-code-in-eclipse.htmlView Android Source Code in Eclipse 2009/8/10 manjunath chandrashekar <manjunath.c83@xxxxxxxxx> Hi All, Am trying to debug the LatinIME code in eclipse. Am getting lots of compilation error whenever i import it and build. If i resolve compilation errors somehow for time being, Eclipse throws and error unable to install the apk file. Please let us know how to debug the LatinIME code? I have tried putting Log.d in the API it works for DDMS, Is there any way i can debug the code in eclipse? Please help. Regards Android Contributor. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~--- Previous Message by Thread:Re: Debbuging webkit using gdb ?I also want to how to debug webkit,If somebody have found the methord,please Let's know. On Aug 5, 12:36 am, oleberre <olebe...@xxxxxxxxx> wrote: > Hi > > I am trying to find a solution to debug webkit while running the > emulator. > > I am trying to attach GDB to the emulator process but then, symbols of > libwebcore.so are not loaded > automatically. > > If I try to add them, I have an error,or a warning ? (see below) : > > (gdb) add-symbol-file ./out/target/product/generic/symbols/system/lib/ > libwebcore.so > The address where ./out/target/product/generic/symbols/system/lib/ > libwebcore.so has been loaded is missing > > I honestly do not know if I go in the right direction. > So, does anybody have an idea how I could debug webkit ? > > Thanks in advance. > Olivier. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~--- Next Message by Thread:Re: Debbuging webkit using gdb ?Thank you very much. I will give it a try as soon as possible. Regards. Olivier --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~---
blog comments powered by Disqus
|
|