Hi Petr,

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

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.

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?

You need more feedback?

Regards,
- Sedat -

[ Some general informations ]

root@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@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

root@fritz:/# cat /proc/meminfo
MemTotal:        30204 kB
MemFree:          1696 kB
Buffers:          3236 kB
Cached:          11032 kB
SwapCached:          0 kB
Active:           9260 kB
Inactive:         9292 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30204 kB
LowFree:          1696 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:           9024 kB
Slab:             5900 kB
CommitLimit:     15100 kB
Committed_AS:     6852 kB
PageTables:        276 kB
VmallocTotal:  1048560 kB
VmallocUsed:      3672 kB
VmallocChunk:  1043636 kB

root@fritz:/# cat /proc/devices
Character devices:
255 avm_net_trace
  1 mem
  2 pty
  3 ttyp
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 13 input
 68 capi_oslib
 90 mtd
128 ptm
136 pts
226 kdsld_traffic
229 kdsld_user
230 tiatm
240 tffs
241 avm_event
242 watchdog
243 kdsld
244 kdsldptrace
245 ubik2
246 debug
251 avm_led
252 avm_power
254 kdsld_misc

Block devices:
 31 mtdblock

[ Start ltrace session ]

root@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@fritz:/# ldd /var/tmp/ltrace
        not a dynamic executable

root@fritz:/# /var/tmp/ltrace --help
Usage: /var/tmp/ltrace [option ...] [command [arg ...]]
Trace library calls of a given program.

  -a, --align=COLUMN  align return values in a secific column.
  -A ARRAYLEN         maximum number of array elements to print.
  -b, --no-signals    don't print signals.
  -c                  count time and calls, and report a summary on exit.
  -C, --demangle      decode low-level symbol names into user-level names.
  -D, --debug=LEVEL   enable debugging (see -Dh or --debug=help).
  -Dh, --debug=help   show help on debugging.
  -e expr             modify which events to trace.
  -f                  trace children (fork() and clone()).
  -F, --config=FILE   load alternate configuration file (may be repeated).
  -g, --no-plt        disable breakpoints on PLT entries.
  -h, --help          display this help and exit.
  -i                  print instruction pointer at time of library call.
  -l, --library=FILE  print library calls from this library only.
  -L                  do NOT display library calls.
  -n, --indent=NR     indent output by NR spaces for each call level nesting.
  -o, --output=FILE   write the trace output to that file.
  -p PID              attach to the process with the process ID pid.
  -r                  print relative timestamps.
  -s STRLEN           specify the maximum string size to print.
  -S                  display system calls.
  -t, -tt, -ttt       print absolute timestamps.
  -T                  show the time spent inside each call.
  -u USERNAME         run command with the userid, groupid of username.
  -V, --version       output version information and exit.
  -x NAME             treat the global NAME like a library subroutine.

Report bugs to [email protected]

root@fritz:/# /var/tmp/ltrace --version
ltrace version 0.7.0-git.
Copyright (C) 1997-2009 Juan Cespedes <[email protected]>.
This is free software; see the GNU General Public Licence
version 2 or later for copying conditions.  There is NO warranty.

root@fritz:/# ps w | grep d[s]ld
  621 root         0 RWN  [kdsld_token]
  575 root      4000 S    dsld -g -i -n

root@fritz:/# /var/tmp/ltrace --config=/var/tmp/etc/ltrace.conf -p $(pidof dsld)
--- SIGSTOP (Stopped (signal)) ---
--- SIGSTOP (Stopped (signal)) ---

root@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) +++

root@fritz:/# /var/tmp/ltrace --debug=help
/var/tmp/ltrace debugging option, --debug=<octal> or -D<octal>:

 number  ref. in source   description
      1   general           Generally helpful progress information
     10   event             Shows every event received by a traced process
     20   process           Shows actions carried upon a traced processes
     40   function          Shows every entry to internal functions

Debugging options are mixed using bitwise-or.
Note that the meanings and values are subject to change.
- EOS (End Of Session) -

Attachment: 0001-ltrace-Switch-to-static-build-by-default.patch
Description: Binary data

_______________________________________________
Ltrace-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/ltrace-devel

Reply via email to