[Tutorial] Debugging (with breakpoints) on C series

Here are software that related with Samsung C series TVs, applications, programs that will run in your TV or computer...:!:This forum is NOT FOR USER QUESTIONS or Problems.
Post Reply

sectroyer
Official SamyGO Developer
Posts: 5510
Joined: Wed May 04, 2011 5:10 pm

[Tutorial] Debugging (with breakpoints) on C series

Post by sectroyer » Mon Oct 05, 2015 3:17 pm

  • Unpack attached archive to /mtd_rwcommon/
  • copy /mtd_rwcommon/gdb to some location from PATH variable
  • add to your .gdbinit:

    Code: Select all

    set libthread-db-search-path /mtd_rwcommon/debug/lib/
    set auto-load safe-path /mtd_rwcommon/debug/lib/
Breakpoints should now be working :)
You do not have the required permissions to view the files attached to this post.
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

plasticassius
Posts: 59
Joined: Fri Dec 17, 2010 12:37 am

Re: [Tutorial] Debugging (with breakpoints) on C series

Post by plasticassius » Tue Oct 27, 2015 8:11 pm

Wow, this is exciting! I've tried to get gdb working, but never got very far. In order to try out your version of gdb, I thought I'd try to make a patch to allow media playback from an xfs format usb drive. However, I'm having some problems. Would you let me know if you can see problems with what I'm doing?

I started gdb with

Code: Select all

gdb /mtd_exe/exeDSP 61
After I did that, when I pressed MEDIA (or any other remote button), the led on the tv flash, but the button has no other effect. After, when I exit gdb with quit, the button has it's effect. Since the button doesn't seem to execute anything while gdb is running, I thought that exeDSP wasn't running. However, when I type 'run' to gdb, I get "The program being debugged has been started already." I want to place breakpoints to see what happens when I press MEDIA, but pressing MEDIA doesn't do anything when gdb is running.

sectroyer
Official SamyGO Developer
Posts: 5510
Joined: Wed May 04, 2011 5:10 pm

Re: [Tutorial] Debugging (with breakpoints) on C series

Post by sectroyer » Tue Oct 27, 2015 10:55 pm

plasticassius wrote:Wow, this is exciting! I've tried to get gdb working, but never got very far. In order to try out your version of gdb, I thought I'd try to make a patch to allow media playback from an xfs format usb drive. However, I'm having some problems. Would you let me know if you can see problems with what I'm doing?

I started gdb with

Code: Select all

gdb /mtd_exe/exeDSP 61
After I did that, when I pressed MEDIA (or any other remote button), the led on the tv flash, but the button has no other effect. After, when I exit gdb with quit, the button has it's effect. Since the button doesn't seem to execute anything while gdb is running, I thought that exeDSP wasn't running. However, when I type 'run' to gdb, I get "The program being debugged has been started already." I want to place breakpoints to see what happens when I press MEDIA, but pressing MEDIA doesn't do anything when gdb is running.
You start gdb incorrectly you should use:

Code: Select all

gdb --pid 61
or even better:

Code: Select all

gdb --pid `pidof exeDSP`
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

plasticassius
Posts: 59
Joined: Fri Dec 17, 2010 12:37 am

Re: [Tutorial] Debugging (with breakpoints) on C series

Post by plasticassius » Wed Oct 28, 2015 5:54 am

Thanks, but it behaves the same when I start it the way you recommend.

sectroyer
Official SamyGO Developer
Posts: 5510
Joined: Wed May 04, 2011 5:10 pm

Re: [Tutorial] Debugging (with breakpoints) on C series

Post by sectroyer » Wed Oct 28, 2015 3:42 pm

plasticassius wrote:Thanks, but it behaves the same when I start it the way you recommend.
I think you don't know how to use gdb :P After starting gdb program is HANGED. You nee to use:

Code: Select all

continue
command to resume it :P It's NORMAL tv doesn't react :P
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

plasticassius
Posts: 59
Joined: Fri Dec 17, 2010 12:37 am

Re: [Tutorial] Debugging (with breakpoints) on C series

Post by plasticassius » Wed Oct 28, 2015 7:35 pm

Yes! Thanks! I ran continue and exeDSP became resposive! However, afterwards, the gdb prompt didn't reappear. I take it that only one of gdb or exeDSP runs at a time. Although, I'm getting messages from gdb about threads starting and exiting.

You're right that I don't have much experience with gdb, but I think that I'll be able to learn more about it now. My next step will be to try out breakpoints and watchpoints.

Post Reply

Return to “[C] Software”

Who is online

Users browsing this forum: No registered users and 1 guest