[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: 6305
Joined: Wed May 04, 2011 5:10 pm

[Tutorial] Debugging (with breakpoints) on C series

Post by sectroyer »

  • 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 https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
plasticassius
Posts: 61
Joined: Fri Dec 17, 2010 12:37 am

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

Post by plasticassius »

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: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

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 https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
plasticassius
Posts: 61
Joined: Fri Dec 17, 2010 12:37 am

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

Post by plasticassius »

Thanks, but it behaves the same when I start it the way you recommend.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

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 https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
plasticassius
Posts: 61
Joined: Fri Dec 17, 2010 12:37 am

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

Post by plasticassius »

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”