[Ltrace-devel] ltrace v0.7.0-git: Session on a Freetz MIPSEL router box

Petr Machata pmachata at redhat.com
Mon Sep 3 10:50:01 UTC 2012


Sedat Dilek <sedat.dilek at gmail.com> writes:

> as promised here my first impressions on ltrace v0.7.0-git on my
> MIPSEL router.

Thank you for this.  I'm trying to install Debian Wheezy on emulated
MIPS64el as I write this, but it takes ages to finish.

> I have built ltrace statically against libelf-0.8.13,
> libstdc++.so.6.0.16 and etc.(see attached patch).
>
> Then, I uploaded ltrace binary together with upstream's ltrace.conf to
> /var/tmp/{etc}.
>
> Unfortunately, ltrace fails when tracing running daemons or ELF
> binaries.

Daemons could be PIE (position independent) binaries, those are not
supported by ltrace.

> I played a bit with --debug=LEVEL... I could see that the new config
> is used (required!) but using other parameters flooded here my box.
> Can you help with debugging?

The config itself is only interesting for formatting displayed library
calls.  You could just pass -F /dev/null.  (But it doesn't hurt if the
file is there.)

> root at fritz:/# cat /proc/version
> Linux version 2.6.13.1-ohio () (gcc version 3.4.6) #1 Tue Mar 27
> 16:53:06 CEST 2012
>
> root at fritz:/# cat /proc/cpuinfo
> system type             : MIPS OHIO
> processor               : 0
> cpu model               : MIPS 4KEc V4.8
> BogoMIPS                : 211.35
> wait instruction        : yes
> microsecond timers      : yes
> tlb_entries             : 16
> extra interrupt vector  : yes
> hardware watchpoint     : yes
> VCED exceptions         : not available
> VCEI exceptions         : not available
>
> [ Start ltrace session ]
>
> root at fritz:/# ls -l /var/tmp/ltrace /var/tmp/etc/ltrace.conf
> -rw-r--r--    1 root     root         15598 Sep  2 15:49
> /var/tmp/etc/ltrace.conf
> -rwxr-xr-x    1 root     root        297220 Sep  2 15:49 /var/tmp/ltrace
>
> root at fritz:/# ldd /var/tmp/ltrace
>         not a dynamic executable
>
> root at fritz:/# /var/tmp/ltrace --version
> ltrace version 0.7.0-git.
> Copyright (C) 1997-2009 Juan Cespedes <cespedes at debian.org>.
> This is free software; see the GNU General Public Licence
> version 2 or later for copying conditions.  There is NO warranty.
>
> root at fritz:/# ps w | grep d[s]ld
>   621 root         0 RWN  [kdsld_token]
>   575 root      4000 S    dsld -g -i -n
>
> root at fritz:/# /var/tmp/ltrace --config=/var/tmp/etc/ltrace.conf -p $(pidof dsld)
> --- SIGSTOP (Stopped (signal)) ---
> --- SIGSTOP (Stopped (signal)) ---
>
> root at fritz:/# /var/tmp/ltrace --config=/var/tmp/etc/ltrace.conf /sbin/dsltest
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> unexpected breakpoint at 0x2acaf3d8
> +++ exited (status 3) +++

Could you compile a trivial binary and see if that happens to work?  As
in:

$ echo 'int main() { puts("blah"); }' | gcc -x c -
$ ltrace ./a.out

Thank you,
PM



More information about the Ltrace-devel mailing list