Closed
Bug 1115639
Opened 10 years ago
Closed 10 years ago
[FFOS7715 v2.1] fail to debug gecko code via ./run-gdb.sh without attach any pid
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1078383
People
(Reporter: ben.song, Unassigned)
Details
No description provided.
While debug some gecko code via gdb without attach any pid and continue, the phone would not restart, but happens some problem like this:
Program received signal SIGSEGV, Segmentation fault.
0x0000af4e in ReserveFileDescriptors (aReservedFds=...) at ../../../gecko/b2g/app/B2GLoader.cpp:239
239 ../../../gecko/b2g/app/B2GLoader.cpp: No such file or directory.
Flags: needinfo?(vchen)
Flags: needinfo?(sku)
Comment 2•10 years ago
|
||
Hi Ben:
Please repo sync all the source, re-build the code, and flash.
gdb server got some issue, and get fixed last week. (both m-c and 2.1)
Let me know if you still have issue on this.
Thanks!!
Shawn
Flags: needinfo?(sku)
Comment 3•10 years ago
|
||
folder: prebuilts/misc
commit 96fbd91680ad26d55aacdcf343371263089bb2df
Author: Cervantes Yu <cyu@mozilla.com>
Date: Fri Oct 24 09:39:07 2014 +0800
Bug 1078383: Update gdbserver to v7.7. r=mwu
This gdbserver binary is built using:
1. Download gdb 7.7 source from GNU web site and extract to $GDB_SOURCE (such as /opt/build/gdb/gdb-7.7/)
2. Under $B2G_REPO (B2G repo dir, such as ~/git/flame-kk/B2G/),
2.1 source setup.sh
2.2 cd $GDB_SOURCE/gdb/gdbserver
2.3 CFLAGS="--sysroot=$B2G_REPO/prebuilts/ndk/8/platforms/android-14/arch-arm" ./configure --host=arm-linux-androideabi
2.4 make
2.5 arm-linux-androideabi-strip ./gdbserver
(In reply to shawn ku [:sku] from comment #2)
> Hi Ben:
> Please repo sync all the source, re-build the code, and flash.
>
> gdb server got some issue, and get fixed last week. (both m-c and 2.1)
>
> Let me know if you still have issue on this.
>
> Thanks!!
> Shawn
Dear Shawn,
I have tried to start run-gdb.sh without attach pid after repo sync and build, flash. But it still couldn't debug normal which restart and stay at the breakpoint.
Thanks.
Hi Cervantes, do you have any idea about why partner still cannot use gdb attach?
Thanks
Flags: needinfo?(vchen) → needinfo?(cyu)
Comment 6•10 years ago
|
||
Please check gdbserver version. You should use gdbserver 7.7 like:
$ adb shell gdbserver --version
GNU gdbserver (GDB) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
gdbserver is free software, covered by the GNU General Public License.
This gdbserver was configured as "arm-linux-androideabi"
If it's still 7.6 then you need to check your prebuilts/misc/. You may push gdbserver manually to /system/bin/.
Flags: needinfo?(cyu)
(In reply to Cervantes Yu from comment #6)
> Please check gdbserver version. You should use gdbserver 7.7 like:
>
> $ adb shell gdbserver --version
> GNU gdbserver (GDB) 7.7.1
> Copyright (C) 2014 Free Software Foundation, Inc.
> gdbserver is free software, covered by the GNU General Public License.
> This gdbserver was configured as "arm-linux-androideabi"
>
> If it's still 7.6 then you need to check your prebuilts/misc/. You may push
> gdbserver manually to /system/bin/.
Dear Cervantes,
While we do update gdbserver to 7.7, it would bring some problem like this:
SPREADTRUM\ben.song@bensongubtpc:/opt/build/gdb/gdb-7.7/gdb/gdbserver$ CFLAGS="/home/likewise-open/SPREADTRUM/ben.song/code/7715_2.1.2_ea/B2G/prebuilts/ndk/8/platforms/android-14/arch-arm" ./configure --host=arm-linux-androideabi
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc
checking for C compiler default output file name...
configure: error: in `/opt/build/gdb/gdb-7.7/gdb/gdbserver':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Do you know how can we fix it ? Thanks.
Comment 8•10 years ago
|
||
(In reply to ben.song from comment #7)
> Dear Cervantes,
>
> While we do update gdbserver to 7.7, it would bring some problem like this:
>
> SPREADTRUM\ben.song@bensongubtpc:/opt/build/gdb/gdb-7.7/gdb/gdbserver$
> CFLAGS="/home/likewise-open/SPREADTRUM/ben.song/code/7715_2.1.2_ea/B2G/
> prebuilts/ndk/8/platforms/android-14/arch-arm" ./configure
> --host=arm-linux-androideabi
> configure: WARNING: If you wanted to set the --build type, don't use --host.
> If a cross compiler is detected then cross compile mode will be used.
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc
> checking for C compiler default output file name...
> configure: error: in `/opt/build/gdb/gdb-7.7/gdb/gdbserver':
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
>
> Do you know how can we fix it ? Thanks.
You didn't specify the CFLAGS argument correctly. Note the --sysroot= in it.
Why would you like to build gdbserver from scratch? gdbserver 7.7 is in built binary form under prebuilts/misc/android-arm.
(In reply to Cervantes Yu from comment #8)
> (In reply to ben.song from comment #7)
> > Dear Cervantes,
> >
> > While we do update gdbserver to 7.7, it would bring some problem like this:
> >
> > SPREADTRUM\ben.song@bensongubtpc:/opt/build/gdb/gdb-7.7/gdb/gdbserver$
> > CFLAGS="/home/likewise-open/SPREADTRUM/ben.song/code/7715_2.1.2_ea/B2G/
> > prebuilts/ndk/8/platforms/android-14/arch-arm" ./configure
> > --host=arm-linux-androideabi
> > configure: WARNING: If you wanted to set the --build type, don't use --host.
> > If a cross compiler is detected then cross compile mode will be used.
> > checking whether to enable maintainer-specific portions of Makefiles... no
> > checking for arm-linux-androideabi-gcc... arm-linux-androideabi-gcc
> > checking for C compiler default output file name...
> > configure: error: in `/opt/build/gdb/gdb-7.7/gdb/gdbserver':
> > configure: error: C compiler cannot create executables
> > See `config.log' for more details.
> >
> > Do you know how can we fix it ? Thanks.
>
> You didn't specify the CFLAGS argument correctly. Note the --sysroot= in it.
>
> Why would you like to build gdbserver from scratch? gdbserver 7.7 is in
> built binary form under prebuilts/misc/android-arm.
Dear Cervantes,
Base on your help I have passed 1 to 2.4, but in 2.5 a problem happens like this:arm-linux-androideabi-strip:./gdbserver: File format not recognized. Do I need modify the CC value ?
Thanks.
Comment 10•10 years ago
|
||
(In reply to ben.song from comment #9)
> Dear Cervantes,
> Base on your help I have passed 1 to 2.4, but in 2.5 a problem happens like
> this:arm-linux-androideabi-strip:./gdbserver: File format not recognized. Do
> I need modify the CC value ?
>
> Thanks.
You don't need to. The steps in the commit comment is all I have to do to produce the binary. I am not sure what problem you encountered, but it works on my side. If you only need to have gdb working, why not use the prebuilt binary?
Hi Song Ben, as Cervantes mentioned, you really don't need to build your own gdb server, it is placed in the prebuilts/misc/android-arm in the AOSP source tree. I am sure you have that available in SPRD...Could you try it first to see if there is still any problem? that will save you sometime I believe
Flags: needinfo?(ben.song)
Reporter | ||
Comment 12•10 years ago
|
||
(In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #11)
> Hi Song Ben, as Cervantes mentioned, you really don't need to build your own
> gdb server, it is placed in the prebuilts/misc/android-arm in the AOSP
> source tree. I am sure you have that available in SPRD...Could you try it
> first to see if there is still any problem? that will save you sometime I
> believe
Dear Vance, Cervantes,
OK, I would update my code and push into phone, then try it.
Thanks a lot.
Flags: needinfo?(ben.song)
Reporter | ||
Comment 13•10 years ago
|
||
(In reply to Vance Chen [:vchen][vchen@mozilla.com] from comment #11)
> Hi Song Ben, as Cervantes mentioned, you really don't need to build your own
> gdb server, it is placed in the prebuilts/misc/android-arm in the AOSP
> source tree. I am sure you have that available in SPRD...Could you try it
> first to see if there is still any problem? that will save you sometime I
> believe
Dear Vance,
Does gdbserver updated by build and flash ? I try the newest version of sprd, but the version still is 7.6.
Thanks.
Hi Cervantes -
Could you help to attach the gdb server ver 7.7 on Bugzilla?
Thanks
Vance
Flags: needinfo?(cyu)
Comment 15•10 years ago
|
||
Did you update your repo manifest?
Please note that $B2G_REPO/prebuilts/misc is now using https://github.com/mozilla-b2g/platform_prebuilts_misc that we forked from AOSP.
You should be able to sync it from here.
Flags: needinfo?(cyu)
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 17•10 years ago
|
||
(In reply to Cervantes Yu from comment #16)
>
> *** This bug has been marked as a duplicate of bug 1078383 ***
Dear Cervantes,
I have downloaded a new B2G code, and run gitk under /B2G/prebuilts/misc/android-arm/gdbserver, but without this submit you said.
Thanks.
Flags: needinfo?(cyu)
Comment 18•10 years ago
|
||
Is your $B2G_REPO/.repo/manifests/base-kk.xml updated?
It should contain the following:
<project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="b2g-4.4.2_r1"/>
Please make sure your repo config for your device use this project as in base-kk.xml.
Flags: needinfo?(cyu)
You need to log in
before you can comment on or make changes to this bug.
Description
•