cross debug glibc loader problem

Amker.Cheng
2010-02-10T12:09:31Z

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

Hi all:
I am trying to debug glibc loader, e.g. ld.so.
I am following instructions at
http://sources.redhat.com/glibc/wiki/Debugging/Loader_Debugging,
the only difference is the cross debugging by running gdbserver from a
mips simulator.
the start up command is :
------------------------------
EGLIBC=/home/user/working-dir/eglibc-test/build/glibc
mipsel-linux-gnu-gdbserver --debug 192.168.10.2:3333 \
$EGLIBC/elf/ld.so.1
"--library-path
$EGLIBC:\
$EGLIBC/math:\
$EGLIBC/elf:\
$EGLIBC/dlfcn:\
$EGLIBC/nss:\
$EGLIBC/nis:\
$EGLIBC/rt:\
$EGLIBC/resolv:\
$EGLIBC/crypt:\
$EGLIBC/nptl \
$EGLIBC/string/tester

then I trying to connect gdbserver in gdb command line by :

target remote 192.168.10.2:3333

strangely, gdb complains that it :"Cannot access memory at address 0x32a14".

I have totally no idea about this question, so please help and any
tips will be appreciated.

Thanks very much.

the remote log file is attached, hoping helpful:

--
Best Regards.

[-- Attachment #2: log.txt --]
[-- Type: text/plain, Size: 5485 bytes --]

w $qSupported#37
r +$PacketSize=7cf;QPassSignals+;qXfer:libraries:read+;qXfer:auxv:read+;qXfer:features:read+#a3
w +$qXfer:features:read:target.xml:0,7ca#46
r +$l<?xml version="1.0"?>\n \n\n \n<target>\n <architecture>mips</architecture>\n <xi:include href="mips-cpu.xml"/>\n <xi:include href="mips-cp0.xml"/>\n <xi:include href="mips-fpu.xml"/>\n\n <feature name="org.gnu.gdb.mips.linux">\n * <reg name="restart" bitsize="32" group="system"/>\n </feature>\n</target>\n#4d
w +$qXfer:features:read:mips-cpu.xml:0,7ca#ed
r +$l<?xml version="1.0"?>\n \n\n \n<feature name="org.gnu.gdb.mips.cpu">\n <reg name="r0" bitsize="32" regnum="0"/>\n <reg name="r1" bitsize="32"/>\n <reg name="r2" bitsize="32"/>\n <reg name="r3" bitsize="32"/>\n <reg name="r4" bitsize="32"/>\n <reg name="r5" bitsize="32"/>\n <reg name="r6" bitsize="32"/>\n <reg name="r7" bitsize="32"/>\n <reg name="r8" bitsize="32"/>\n <reg name="r9" bitsize="32"/>\n <reg name="r10" bitsize="32"/>\n <reg name="r11" bitsize="32"/>\n <reg name="r12" bitsize="32"/>\n <reg name="r13" bitsize="32"/>\n <reg name="r14" bitsize="32"/>\n <reg name="r15" bitsize="32"/>\n <reg name="r16" bitsize="32"/>\n <reg name="r17" bitsize="32"/>\n <reg name="r18" bitsize="32"/>\n <reg name="r19" bitsize="32"/>\n <reg name="r20" bitsize="32"/>\n <reg name="r21" bitsize="32"/>\n <reg name="r22" bitsize="32"/>\n <reg name="r23" bitsize="32"/>\n <reg name="r24" bitsize="32"/>\n <reg name="r25" bitsize="32"/>\n <reg name="r26" bitsize="32"/>\n <reg name="r27" bitsize="32"/>\n <reg name="r28" bitsize="32"/>\n <reg name="r29" bitsize="32"/>\n <reg name="r30" bitsize="32"/>\n <reg name="r31" bitsize="32"/>\n\n <reg name="lo" bitsize="32" regnum="33"/>\n <reg name="hi" bitsize="32" regnum="34"/>\n <reg name="pc" bitsize="32" regnum="37"/>\n</feature>\n#be
w +$qXfer:features:read:mips-cp0.xml:0,7ca#a8
r +$l<?xml version="1.0"?>\n \n\n \n<feature name="org.gnu.gdb.mips.cp0">\n <reg name="status" bitsize="32" regnum="32"/>\n <reg name="badvaddr" bitsize="32" regnum="35"/>\n <reg name="cause" bitsize="32" regnum="36"/>\n</feature>\n#11
w +$qXfer:features:read:mips-fpu.xml:0,7ca#f0
r +$m<?xml version="1.0"?>\n \n\n \n<feature name="org.gnu.gdb.mips.fpu">\n <reg name="f0" bitsize="32" type="ieee_single" regnum="38"/>\n <reg name="f1" bitsize="32" type="ieee_single"/>\n <reg name="f2" bitsize="32" type="ieee_single"/>\n <reg name="f3" bitsize="32" type="ieee_single"/>\n <reg name="f4" bitsize="32" type="ieee_single"/>\n <reg name="f5" bitsize="32" type="ieee_single"/>\n <reg name="f6" bitsize="32" type="ieee_single"/>\n <reg name="f7" bitsize="32" type="ieee_single"/>\n <reg name="f8" bitsize="32" type="ieee_single"/>\n <reg name="f9" bitsize="32" type="ieee_single"/>\n <reg name="f10" bitsize="32" type="ieee_single"/>\n <reg name="f11" bitsize="32" type="ieee_single"/>\n <reg name="f12" bitsize="32" type="ieee_single"/>\n <reg name="f13" bitsize="32" type="ieee_single"/>\n <reg name="f14" bitsize="32" type="ieee_single"/>\n <reg name="f15" bitsize="32" type="ieee_single"/>\n <reg name="f16" bitsize="32" type="ieee_single"/>\n <reg name="f17" bitsize="32" type="ieee_single"/>\n <reg name="f18" bitsize="32" type="ieee_single"/>\n <reg name="f19" bitsize="32" type="ieee_single"/>\n <reg name="f20" bitsize="32" type="ieee_single"/>\n <reg name="f21" bitsize="32" type="ieee_single"/>\n <reg name="f22" bitsize="32" type="ieee_single"/>\n <reg name="f23" bitsize="32" type="ieee_single"/>\n <reg name="f24" bitsize="32" type="ieee_single"/>\n <reg name="f25" bitsize="32" type="ieee_single"/>\n <reg name="f26" bitsize="32" type="ieee_single"/>\n <reg name="f27" bitsize="32" type="ieee_single"/>\n <reg name="f28" bitsize="32" type="ieee_single"/>\n <reg name="f29" bitsize="32" type="ieee_single"/>\n <reg name="f30" bitsize="32" type="ieee_single"/>\n <reg name="f31" bi#50
w +$qXfer:features:read:mips-fpu.xml:7ca,7ca#bb
r +$ltsize="32" type="ieee_single"/>\n\n <reg name="fcsr" bitsize="32" group="float"/>\n <reg name="fir" bitsize="32" group="float"/>\n</feature>\n#1a
w ++$?#3f
r +$T051d:3062a97f;25:40085* ;thread:2e39;#dc
w +$Hc-1#09
r +$OK#9a
w +$qC#b4
r +$QC2e39#97
w +$qOffsets#4b
r +$#00
w +$m32a14,4#f8
r +$E01#a6
w +
End of log