bmwskead: not your fault, it was mine not using g in sed
arris69: you are the best!! And now it also checks that the library actually exists... cool
I stripped the gdb binary. Now it is around 3MB: http://www.box.net/shared/d3uuviu0qu
tusko wrote:I stripped the gdb binary.
# /mtd_rwarea/gdbtrick.sh
The following commands:
---
attach 62
call dlopen("/mtd_tlib/GGame/avrfix2-cip/load.so", 2)
call dlsym($1, "Game_Main")
call $2("/mtd_tlib/GGame/avrfix2-cip/", 0)
detach
---
will be executed by /mtd_rwarea/gdb in 5 secs!!
#
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.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0x405fd008 in pthread_cond_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
$1 = 48001128
$2 = 1914337220
$3 = 0bruintje71 wrote:I have put the gdb binary and the gdbtrick.sh script (the one last posted by Arris69) in the mtd_rwarea.
#!/bin/sh
### begin configure me
# gdb_binary: where your gdb binary resides
gdb_binary=/mtd_rwarea/
# gdb_commands: this is a temporary file where gdb commands are stored
gdb_commands=/mtd_rwarea/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 spaces!!
# this script requires paths WITHOUT spaces
libraries="/mtd_tlib/GGame/channelinfo/loader.so" # add more libraries here
### end configure me #mtd_rwarea/gdbtrick.sh
The following commands:
---
attach 49
detach
---
will be executed by /mtd_rwarea/ in 30 secs!!
# mtd_rwarea/gdbtrick.sh: mtd_rwarea/gdbtrick.sh: 38: /mtd_rwarea/: Permission denied
{ sleep $gdb_delay; $gdb_binary -batch -x $gdb_commands; } &#!/bin/sh
### begin configure me
# gdb_binary: where your gdb binary resides
gdb_binary=/mtd_rwarea/gdb
# gdb_commands: this is a temporary file where gdb commands are stored
gdb_commands=/mtd_rwarea/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=5
# libraries: absolute path of libraries to be loaded
# there can be several, separated spaces!!
# this script requires paths WITHOUT spaces
libraries="/mtd_tlib/GGame/avrfix2-cip/load.so" # add more libraries here
### end configure me
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++
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; } &
bruintje71 wrote:I think you simply need to replace "gdb_binary=/mtd_rwarea/" by "gdb_binary=/mtd_rwarea/gdb"
localhost login: root
-sh: id: not found
# mtd_rwarea/gdbtrick.sh
The following commands:
---
attach 48
detach
---
will be executed by /mtd_rwarea/gdb in 5 secs!!
# mtd_rwarea/gdbtrick.sh: mtd_rwarea/gdbtrick.sh: 33: /mtd_rwarea/gdb: Permission denied
#
#!/bin/sh
### begin configure me
# gdb_binary: where your gdb binary resides
gdb_binary=/mtd_rwarea/gdb/
# gdb_commands: this is a temporary file where gdb commands are stored
gdb_commands=/mtd_rwarea/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=5
# libraries: absolute path of libraries to be loaded
# there can be several, separated spaces!!
# this script requires paths WITHOUT spaces
#libraries="/mtd_tlib/GGame/channelinfo/loader.so /mtd_tlib/GGame/avrfix2/telnet.so /mtd_tlib/GGame/Switch/loader.so" # add more libraries here
libraries="/mtd_tlib/GGame/channelinfo/loader.so" # add more libraries here
### end configure me
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++
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; } &# chmod 755 mtd_rwarea/gdb
# /mtd_rwarea/gdbtrick.sh
The following commands:
---
attach 48
call dlopen("/mtd_tlib/GGame/channelinfo/loader.so", 2)
call dlsym($1, "Game_Main")
call $2("/mtd_tlib/GGame/channelinfo/", 0)
detach
---
will be executed by /mtd_rwarea/gdb/ in 5 secs!!
# /mtd_rwarea/gdbtrick.sh: /mtd_rwarea/gdbtrick.sh: 33: /mtd_rwarea/gdb/: Permission denied
gdb_binary=/mtd_rwarea/gdb/gdb_binary=/mtd_rwarea/gdb/gdb
Users browsing this forum: No registered users and 3 guests