huh, thank You, it works. In future i should read manuals more carefully before my tv brickstusko wrote:Only make the first change. Re-read it
Autoloader for custom "Game" plug-ins
Re: Autoloader for custom "Game" plug-ins
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]
DO NOT EVER INSTALL FIRMWARE UPGRADE
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]
DO NOT EVER INSTALL FIRMWARE UPGRADE
Re: Autoloader for custom "Game" plug-ins
Hi tusko,tusko wrote:arris69: damn, you are right , thanks I edited the script. By the way, I would like to avoid the 'sed' command completely and using pidof is a step in the right direction. There is still more 'sed', though. For example, when assigning l_dirname. Unfortunately, the obvious solution (using dirname shell command) does not work in my TV.
manga00: what happens if you follow the advice of arris69?
bmwskead: the "libthread_db.so.1" error happens to me also, but despite this error, gdb executes and loads libraries OK. So the channelinfo extension does not work? I do not know anything about this extension but I can try, what it is purpose and where I can download it?
it runs very fine with the script of arris69 thanks so lot, and also with your stripped gdb.
thanks tusko for this trick
Code: Select all
# ./gdb
dlopen failed on 'libthread_db.so.1' - libthread_db.so.1: cannot open shared object file: No such file or directory
GDB will not be able to debug pthreads.
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "armv6l-unknown-linux-gnu".
(gdb) attach 57
Attaching to process 57
Reading symbols from /mtd_exe/exeDSP...(no debugging symbols found)...done.
Reading symbols from /mtd_exe/InfoLink/lib/libAdi.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libAdi.so
Reading symbols from /mtd_exe/InfoLink/lib/libAe.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libAe.so
Reading symbols from /mtd_exe/InfoLink/lib/libCore.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libCore.so
Reading symbols from /mtd_exe/InfoLink/lib/libHttp.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libHttp.so
Reading symbols from /mtd_exe/InfoLink/lib/libJi.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libJi.so
Reading symbols from /mtd_exe/InfoLink/lib/libJs.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libJs.so
Reading symbols from /mtd_exe/InfoLink/lib/libPhnd.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libPhnd.so
Reading symbols from /mtd_exe/InfoLink/lib/libSui.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libSui.so
Reading symbols from /mtd_exe/InfoLink/lib/libWsal.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libWsal.so
Reading symbols from /mtd_exe/InfoLink/lib/libExtention.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libExtention.so
Reading symbols from /mtd_exe/InfoLink/lib/libPl.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libPl.so
Reading symbols from /mtd_exe/InfoLink/lib/libPlApp.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libPlApp.so
Reading symbols from /mtd_exe/InfoLink/lib/libGCF.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libGCF.so
Reading symbols from /mtd_exe/InfoLink/lib/libMMFCore.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/InfoLink/lib/libMMFCore.so
Reading symbols from /mtd_exe/YWidget_LIB/libPluginTvOEM.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/YWidget_LIB/libPluginTvOEM.so
Reading symbols from /mtd_exe/YWidget_LIB/libYahooTimeManager.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/YWidget_LIB/libYahooTimeManager.so
Reading symbols from /mtd_exe/YWidget_LIB/libYahooSDLHWAcceleration.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/YWidget_LIB/libYahooSDLHWAcceleration.so
Reading symbols from /mtd_exe/GAME_LIB/libGPlayerPorting.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/GAME_LIB/libGPlayerPorting.so
Reading symbols from /mtd_exe/GAME_LIB/libSDL.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/GAME_LIB/libSDL.so
Reading symbols from /mtd_exe/GAME_LIB/libpngGP.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/GAME_LIB/libpngGP.so
Reading symbols from /mtd_exe/GAME_LIB/libungif.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/GAME_LIB/libungif.so
Reading symbols from /mtd_exe/GAME_LIB/libSDL_image.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/GAME_LIB/libSDL_image.so
Reading symbols from /mtd_exe/GAME_LIB/libsmpeg.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/GAME_LIB/libsmpeg.so
Reading symbols from /mtd_exe/GAME_LIB/libSDL_mixer.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/GAME_LIB/libSDL_mixer.so
Reading symbols from /mtd_exe/Comp_LIB/libptp.so...(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/Comp_LIB/libptp.so
Reading symbols from /mtd_exe/Comp_LIB/libusb.so...
(no debugging symbols found)...done.
Loaded symbols for /mtd_cmmlib/Comp_LIB/libusb.so
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libpthread.so.0...
(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libstdc++.so.6...done.
Loaded symbols for /lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.3...done.
Loaded symbols for /lib/ld-linux.so.3
Reading symbols from /mtd_tlib/GGame/SamyGO/exe/geopvr/loader.so...done.
Loaded symbols for /mtd_tlib/GGame/SamyGO/exe/geopvr/loader.so
Reading symbols from /mtd_tlib/GGame/SamyGO/exe/geopvr/pvr.so...done.
Loaded symbols for /mtd_tlib/GGame/SamyGO/exe/geopvr/pvr.so
0x405fd008 in pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
Last edited by manga00 on Sun Jun 27, 2010 10:54 pm, edited 1 time in total.
Re: Autoloader for custom "Game" plug-ins
Hi tusko,
I can start geopvr, i cant start avrfix2 start with gdb. the output from gdb mean i must be start :
"set unwindonsignal on"
I hope this is better to understand
I must restart my Tv by unplug from power.
The Cannelinfo plug work.
how can i do that??
I can start geopvr, i cant start avrfix2 start with gdb. the output from gdb mean i must be start :
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
/mtd_tlib/GGame/SamyGo/gdb/gdbtrick.gdb:7: Error in sourced command file:
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (at 0x0) will be abandoned.
Code: Select all
#!/bin/sh
### begin configure me
# gdb_binary: where your gdb binary resides
gdb_binary=/mtd_tlib/GGame/SamyGo/gdb/gdb
# gdb_commands: this is a temporary file where gdb commands are stored
gdb_commands=/mtd_tlib/GGame/SamyGo/gdb/gdbtrick.gdb
# gdb_delay: gdb will be scheduled to run after $gdb_delay seconds
# this is for letting exeDSP to settle down at TV startup
gdb_delay=30
# libraries: absolute path of libraries to be loaded
# there can be several separated by commas (no spaces!!)
# this script requires paths WITHOUT spaces AND commas
#this line is ok!!
libraries="/mtd_tlib/GGame/SamyGO/ChannelInfo/loader.so /mtd_tlib/GGame/SamyGO/exe/geopvr/loader.so"
#this not!! i have switch between to test
libraries="/mtd_tlib/GGame/avrfix2/aspect.so"
### end configure me
#cd $gdb_binary
echo "Starte Plugins"
exeDSP_PID=$(pidof exeDSP)
temp='attach '$exeDSP_PID'\n'
i=0
for l in $libraries
do
if [ -e "$l" ] ;then
temp=$temp'call dlopen("'$l'", 2)\n'
let i++
temp=$temp'call dlsym($'$i', "Game_Main")\n'
let i++
temp=$temp'call $'$i'("'${l%/*}/'", 0)\n'
let i++
temp=$temp'call dlclose($'$((i-2))')\n'
let i++
fi
done
temp=$temp'detach\n'
echo -e 'The following commands:\n---\n'$temp'---\nwill be executed by '$gdb_binary' in '$gdb_delay' secs!!\n'
echo -e $temp >$gdb_commands
{ sleep $gdb_delay; $gdb_binary -batch -x $gdb_commands; rm $gdb_commands; } &
echo "done!"
Code: Select all
after that is the exeDSB going down:
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "armv6l-unknown-linux-gnu".
(gdb) attach 57
Attaching to process 57
ptrace: No such process.
(gdb) quit
I must restart my Tv by unplug from power.
The Cannelinfo plug work.
how can i do that??
Last edited by manga00 on Sun Jun 27, 2010 11:10 pm, edited 7 times in total.
Re: Autoloader for custom "Game" plug-ins
Hello! That's great! I just think that it is needed to call dlclose($1) just after calling Game_Main().
Re: Autoloader for custom "Game" plug-ins
It should be safe because exeDSP always calls dlclose() this way. Extensions consist of loader.so and <extension>.so. Loader just opens <extension>.so with dlopen(RTLD_NODELETE) in its Game_Main(). No functions and variables will be used after returning from Game_Main() so you can safely dlclose() loader.so.tusko wrote:what happens if the library gets unloaded? Maybe some extension could stop working after that?
It is not important. Just a cleanup.bruintje71 wrote:Why is calling dlclose() important?