Closed Bug 934893 Opened 11 years ago Closed 10 years ago

[flatfish] run-gdb.sh, gdb breakpoint can't stop

Categories

(Firefox OS Graveyard :: General, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME
ProductDemo

People

(Reporter: tommy.cvkk, Unassigned)

References

Details

(Whiteboard: [flatfish])

Attachments

(3 files)

it should stop at the breakpoint, but it didn't.
Please refer to the file (gdb_no_stop.log).
Blocks: flatfish
I am not sure the steps you used for gdb. Here I posted my steps.

1. Open device to Homescreen.
2. Run ./watch-procrank.sh in terminator in PC. You can see this file in the top layer of B2G. After running, you can see the below message.  In my case

   APPLICATION        PID
   b2g                355
   .....
   Preallocated a     3938

   The PID 3938 is the app you will run next. For example, if you run Video app at this moment, the PID of Video app will be 3938

3. |./run-gdb.sh attach 3938| before you run any app. When gdb prompt showss up, 
   3.1 Set break point
   3.2 run c command to free run.

4. Lanch the app you want.
I want to set break point at this line 296 "findMatchingCodecs" in the function OMXCodec::Create(), how to do that ? 

This part of source code is not Video app, but it seems to be b2g.
so ./run-gdb.sh attach 3938

Am I right ?
(In reply to tommy_chiu from comment #2)
> I want to set break point at this line 296 "findMatchingCodecs" in the
> function OMXCodec::Create(), how to do that ? 
> 
> This part of source code is not Video app, but it seems to be b2g.
> so ./run-gdb.sh attach 355   ==> sorry, I mean b2g's pid.
> 
> Am I right ?
(In reply to tommy_chiu from comment #3)
> (In reply to tommy_chiu from comment #2)
> > I want to set break point at this line 296 "findMatchingCodecs" in the
> > function OMXCodec::Create(), how to do that ? 
> > 
> > This part of source code is not Video app, but it seems to be b2g.
> > so ./run-gdb.sh attach 355   ==> sorry, I mean b2g's pid.
> > 
> > Am I right ?

libstagefright lives in client (app) process and you should attach gdb with the Pid of client process.
Attached file gdb_no_stop1.log
Attach Video Pid log. ( It is still failed ).
For the break point in HTMLMediaElement::Play(...), I tried to do some tests. Actually the Play action will stop at

[1]:http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/HTMLMediaElement.cpp#2082

and not in 

[2]:http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/HTMLMediaElement.cpp#2145

I can stop in [1] by gdb. Maybe you can tried to set your break point again.
Yes, the case [1] is OK, but the case [2] is NG.
The steps to enable run-gdb.sh .
It works fine now, please refer to (run-gdb_works_fine_report.txt).
Whiteboard: [TCP]
Whiteboard: [TCP]
Whiteboard: [flatfish]
(In reply to tommy_chiu from comment #9)
> It works fine now, please refer to (run-gdb_works_fine_report.txt).

Tommy, I don't think you need modify "gonk-misc/default-gecko-config".

Did you try only set B2G_NOOPT=0 in .userconfig ?
Regarding to comment 6, close this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: