Debian Bug report logs -
#35524
ltrace lacks sparc support
Reported by: Adam Di Carlo <aph@debian.org>
Date: Sun, 4 Apr 1999 00:48:00 UTC
Severity: wishlist
Found in version 0.3.6
Fixed in version ltrace/0.3.34
Done: Juan Cespedes <cespedes@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Juan Cespedes <cespedes@debian.org>:
Bug#35524; Package ltrace.
(full text, mbox, link).
Acknowledgement sent to Adam Di Carlo <aph@debian.org>:
New bug report received and forwarded. Copy sent to Juan Cespedes <cespedes@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: ltrace
Version: 0.3.6
Included is a patch to enable compilation on the sparc. I've flattened
sparc64 with just sparc, since sun4u just runs 32 bit userland all
around at this point.
Note that the resulting binary does *not* function, but hangs:
> gdb ltrace
[...]
(gdb) run expr 1 + 1
Starting program: /amnt/burrito-uld/port/ltrace-0.3.6/ltrace expr 1 + 1
warning: Unable to find dynamic linker breakpoint function.
warning: GDB will be unable to debug shared library initializers
warning: and track explicitly loaded dynamic code.
Program received signal SIGINT, Interrupt.
(gdb) where
#0 0x700db660 in umount ()
#1 0x700d6408 in ptrace ()
#2 0x11030 in get_instruction_pointer (pid=12138) at regs.c:11
#3 0x1416c in wait_for_something () at wait_for_something.c:99
#4 0x11518 in main (argc=5, argv=0xeffff7e8) at ltrace.c:61
#5 0x70045420 in ()
I'm not a manly enough C programmer to fix this. Sorry.
--
.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>
diff -Nur ltrace-0.3.6.orig/debian/rules ltrace-0.3.6/debian/rules
--- ltrace-0.3.6.orig/debian/rules Wed Sep 23 04:38:00 1998
+++ ltrace-0.3.6/debian/rules Sat Apr 3 18:57:39 1999
@@ -44,7 +44,7 @@
clean:
$(checkdir)
$(RM) -f build debian/files debian/substvars
- $(MAKE) distclean || $(MAKE) -f Makefile.in distclean
+ $(MAKE) distclean || $(MAKE) -f Makefile.in distclean || true
$(RM) -rf debian/tmp
define checkdir
diff -Nur ltrace-0.3.6.orig/ltrace.spec ltrace-0.3.6/ltrace.spec
--- ltrace-0.3.6.orig/ltrace.spec Thu Sep 24 07:50:14 1998
+++ ltrace-0.3.6/ltrace.spec Sat Apr 3 19:11:17 1999
@@ -1,6 +1,6 @@
Summary: A library call tracer
Name: ltrace
-%define version 0.3.5
+%define version 0.3.6
Version: %{version}
Release: 1
Copyright: GPL
diff -Nur ltrace-0.3.6.orig/sysdeps/Linux/Makefile ltrace-0.3.6/sysdeps/Linux/Makefile
--- ltrace-0.3.6.orig/sysdeps/Linux/Makefile Thu Sep 24 07:38:46 1998
+++ ltrace-0.3.6/sysdeps/Linux/Makefile Sat Apr 3 18:59:59 1999
@@ -1,4 +1,4 @@
-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sparc64/sparc/ -e s/arm.*/arm/ -e s/sa110/arm/)
CFLAGS += -I$(TOPDIR)/sysdeps/Linux/$(ARCH)
Binary files ltrace-0.3.6.orig/sysdeps/Linux/m68k/.trace.c.swp and ltrace-0.3.6/sysdeps/Linux/m68k/.trace.c.swp differ
Binary files ltrace-0.3.6.orig/sysdeps/Linux/sparc/.trace.c.swp and ltrace-0.3.6/sysdeps/Linux/sparc/.trace.c.swp differ
diff -Nur ltrace-0.3.6.orig/sysdeps/Linux/sparc/regs.c ltrace-0.3.6/sysdeps/Linux/sparc/regs.c
--- ltrace-0.3.6.orig/sysdeps/Linux/sparc/regs.c Fri Sep 25 06:54:45 1998
+++ ltrace-0.3.6/sysdeps/Linux/sparc/regs.c Sat Apr 3 19:04:15 1999
@@ -4,6 +4,7 @@
#include <sys/types.h>
#include <sys/ptrace.h>
+#include <asm/ptrace.h>
void * get_instruction_pointer(pid_t pid)
{
diff -Nur ltrace-0.3.6.orig/sysdeps/Linux/sparc/trace.c ltrace-0.3.6/sysdeps/Linux/sparc/trace.c
--- ltrace-0.3.6.orig/sysdeps/Linux/sparc/trace.c Fri Sep 25 06:15:50 1998
+++ ltrace-0.3.6/sysdeps/Linux/sparc/trace.c Sat Apr 3 19:11:05 1999
@@ -4,19 +4,19 @@
#include <sys/types.h>
#include <sys/wait.h>
-#include <signal.h>
#include <sys/ptrace.h>
+#include <signal.h>
#include "ltrace.h"
/* Returns syscall number if `pid' stopped because of a syscall.
* Returns -1 otherwise
*/
-int syscall_p(pid_t pid, int status)
+int syscall_p(struct process * proc, int status, int * sysnum)
{
#if 0
if (WIFSTOPPED(status) && WSTOPSIG(status)==SIGTRAP) {
- int tmp = ptrace(PTRACE_PEEKUSER, pid, 4*ORIG_EAX);
+ int tmp = ptrace(PTRACE_PEEKUSER, proc, 4*ORIG_EAX);
if (tmp>=0) {
return tmp;
}
@@ -68,3 +68,27 @@
#endif
return 0;
}
+
+
+int umovestr(struct process * proc, void * addr, int len, void * laddr)
+{
+ long a;
+ int i;
+ int offset=0;
+
+ while(offset<len) {
+ a = ptrace(PTRACE_PEEKTEXT, proc->pid, addr+offset, 0);
+ for(i=0; i<sizeof(long); i++) {
+ if (((char*)&a)[i] && offset+i < len) {
+ *(char *)(laddr+offset+i) = ((char*)&a)[i];
+ } else {
+ *(char *)(laddr+offset+i) = '\0';
+ return 0;
+ }
+ }
+ offset += sizeof(long);
+ }
+ *(char *)(laddr+offset) = '\0';
+ return 0;
+}
+
diff -Nur ltrace-0.3.6.orig/sysdeps/Linux/sparc/trace.c~ ltrace-0.3.6/sysdeps/Linux/sparc/trace.c~
--- ltrace-0.3.6.orig/sysdeps/Linux/sparc/trace.c~ Wed Dec 31 19:00:00 1969
+++ ltrace-0.3.6/sysdeps/Linux/sparc/trace.c~ Sat Apr 3 19:08:39 1999
@@ -0,0 +1,70 @@
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/ptrace.h>
+#include <signal.h>
+
+#include "ltrace.h"
+
+/* Returns syscall number if `pid' stopped because of a syscall.
+ * Returns -1 otherwise
+ */
+int syscall_p(struct process * proc, int status, int * sysnum)
+{
+#if 0
+ if (WIFSTOPPED(status) && WSTOPSIG(status)==SIGTRAP) {
+ int tmp = ptrace(PTRACE_PEEKUSER, proc, 4*ORIG_EAX);
+ if (tmp>=0) {
+ return tmp;
+ }
+ }
+#endif
+ return -1;
+}
+
+void continue_after_breakpoint(struct process *proc, struct breakpoint * sbp, int delete_it)
+{
+ delete_breakpoint(proc->pid, sbp);
+ ptrace(PTRACE_POKEUSER, proc->pid, PT_PC, sbp->addr);
+ if (delete_it) {
+ continue_process(proc->pid);
+ } else {
+ proc->breakpoint_being_enabled = sbp;
+ ptrace(PTRACE_SINGLESTEP, proc->pid, 0, 0);
+ }
+}
+
+long gimme_arg(enum tof type, struct process * proc, int arg_num)
+{
+#if 0
+ if (arg_num==-1) { /* return value */
+ return ptrace(PTRACE_PEEKUSER, proc->pid, 4*EAX);
+ }
+
+ if (type==LT_TOF_FUNCTION) {
+ return ptrace(PTRACE_PEEKTEXT, proc->pid, proc->stack_pointer+4*(arg_num+1));
+ } else if (type==LT_TOF_SYSCALL) {
+#if 0
+ switch(arg_num) {
+ case 0: return ptrace(PTRACE_PEEKUSER, proc->pid, 4*EBX);
+ case 1: return ptrace(PTRACE_PEEKUSER, proc->pid, 4*ECX);
+ case 2: return ptrace(PTRACE_PEEKUSER, proc->pid, 4*EDX);
+ case 3: return ptrace(PTRACE_PEEKUSER, proc->pid, 4*ESI);
+ case 4: return ptrace(PTRACE_PEEKUSER, proc->pid, 4*EDI);
+ default:
+ fprintf(stderr, "gimme_arg called with wrong arguments\n");
+ exit(2);
+ }
+#else
+ return ptrace(PTRACE_PEEKUSER, proc->pid, 4*arg_num);
+#endif
+ } else {
+ fprintf(stderr, "gimme_arg called with wrong arguments\n");
+ exit(1);
+ }
+#endif
+ return 0;
+}
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#35524; Package ltrace.
(full text, mbox, link).
Acknowledgement sent to Juan Cespedes <cespedes@debian.org>:
Extra info received and forwarded to list.
(full text, mbox, link).
Message #10 received at 35524@bugs.debian.org (full text, mbox, reply):
On Sat, Apr 03, 1999 at 07:43:26PM -0500, Adam Di Carlo wrote:
>
> Package: ltrace
> Version: 0.3.6
>
> Included is a patch to enable compilation on the sparc. I've flattened
> sparc64 with just sparc, since sun4u just runs 32 bit userland all
> around at this point.
Thank you. Unfortunately, I've just uploaded a new version of ltrace
_without_ Sparc support :(
> Note that the resulting binary does *not* function, but hangs:
OK, I'll look at it and tell you if I can make it work.
--
Juan Cespedes
Changed Bug title.
Request was from Juan Cespedes <cespedes@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Severity set to `wishlist'.
Request was from Juan Cespedes <cespedes@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Reply sent to Juan Cespedes <cespedes@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Adam Di Carlo <aph@debian.org>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #19 received at 35524-close@bugs.debian.org (full text, mbox, reply):
Source: ltrace
Source-Version: 0.3.34
We believe that the bug you reported is fixed in the latest version of
ltrace, which is due to be installed in the Debian FTP archive:
ltrace_0.3.34.dsc
to pool/main/l/ltrace/ltrace_0.3.34.dsc
ltrace_0.3.34.tar.gz
to pool/main/l/ltrace/ltrace_0.3.34.tar.gz
ltrace_0.3.34_i386.deb
to pool/main/l/ltrace/ltrace_0.3.34_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 35524@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Juan Cespedes <cespedes@debian.org> (supplier of updated ltrace package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Wed, 07 Jul 2004 10:40:56 +0200
Source: ltrace
Binary: ltrace
Architecture: source i386
Version: 0.3.34
Distribution: unstable
Urgency: low
Maintainer: Juan Cespedes <cespedes@debian.org>
Changed-By: Juan Cespedes <cespedes@debian.org>
Description:
ltrace - Tracks runtime library calls in dynamically linked programs
Closes: 35524 252756
Changes:
ltrace (0.3.34) unstable; urgency=low
.
* Fixed prototype declaration problem in arm, m68k, powerpc, s390
* Added "amd64" to list of architectures (closes: Bug#252756)
* Sparc port is hopefully working (closes: Bug#35524)
Files:
254c897e73a3de23314486ad0e06df18 524 utils optional ltrace_0.3.34.dsc
ea0edc11d2f01edd60d1de9e7cce71f7 95225 utils optional ltrace_0.3.34.tar.gz
268f6e1f82f57f262f610dcf7b0f5463 61486 utils optional ltrace_0.3.34_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFA67kEepWluYh4RwMRAtnWAKCXjer7eRmIp13bnXjVELRy2smDZgCfXBO1
AgMCAgyG/QH8Y62u5QPFCgI=
=5dzQ
-----END PGP SIGNATURE-----
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Mon Jul 15 17:38:39 2024;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.