[parisc-linux] Re: Any good rules of pratice about branching insn into the delay slot of another one?
Joel Soete
soete.joel at tiscali.be
Mon Apr 3 09:19:51 MDT 2006
> > mmm, don't know how to set a break at this point (how should I determine
> > the address of the break point?)
>
> just break at the beginning of clone and step through it one insn at a
> time.
mmm, I see why was I confused:
# gdb ./clone04
[...]
(gdb) b clone
Function "clone" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (clone) pending.
(gdb) r
Starting program:
/CAD/jso.tmp/ltp-full-20060205/testcases/kernel/syscalls/clone/clone04
Breakpoint 2 at 0x40189a18
Pending breakpoint "clone" resolved
Breakpoint 2, 0x40189a18 in clone () from /usr/lib/debug/libc.so.6
by bad was previously looking at 'disas __clone' or 'print clone':
(gdb) print clone
$1 = {<text variable, no debug info>} 0x40189a14 <clone>
(gdb) disas clone
Dump of assembler code for function clone:
0x40189a14 <clone+0>: stw rp,-14(,sp)
and obviously tried to 'b 0x40189a14' where I would have to do as gdb does:
put the breack point on next insn (e.g. 0x40189a14+4) ;-)
> or, break in main, then do 'print clone' to get the address of clone.
>
> randolph
>
>
Thanks,
Joel
PS: btw, fwiw some new error like :
# ./tst-iconv4; echo $?
0
and doesn't seems to be related to clone() at all:
# gdb ./tst-iconv4
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "hppa-linux"...Using host libthread_db library
"/usr/lib/debug/libthread_db.so.1".
(gdb) b clone
Function "clone" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (clone) pending.
(gdb) r
Starting program:
/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/iconvdata/tst-iconv4
Breakpoint 2 at 0x40169a18
Pending breakpoint "clone" resolved
Program exited normally.
====
but the the actual cmd test is more complex to analyse (to me):
GCONV_PATH=/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/iconvdata
LC_ALL=C /CAD/parisc-linux/Dpkg/dpkg-work/g
libc-2.3.6/build-tree/hppa-libc/elf/ld.so.1 --library-path
/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc:/CAD/pa
risc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/math:/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/el
f:/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/dlfcn:/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hp
pa-libc/nss:/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/nis:/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build
-tree/hppa-libc/rt:/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/resolv:/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2
.3.6/build-tree/hppa-libc/crypt:/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/linuxthreads
/CAD/parisc-linux/Dpk
g/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/iconvdata/tst-iconv4 >
/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-li
bc/iconvdata/tst-iconv4.out
Timed out: killed the child process
make[3]: ***
[/CAD/parisc-linux/Dpkg/dpkg-work/glibc-2.3.6/build-tree/hppa-libc/iconvdata/tst-iconv4.out]
Error 1
as well the reference test clone04:
# ./clone04 ; echo $?
clone04 1 PASS : expected failure; Got EINVAL
0
Any idea?
Thanks a lot,
Joel
---------------------------------------------------------------
A free anti-spam and anti-virus filter on all Scarlet mailboxes
More info on http://www.scarlet.be/
More information about the parisc-linux
mailing list