[Bug 1398143] Comment bridged from LTC Bugzilla
bugproxy
bugproxy at us.ibm.com
Thu Jun 25 12:50:14 UTC 2015
------- Comment From thierry.fauck at fr.ibm.com 2015-06-25 12:39 EDT-------
The patch mentioned in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744752 is not sufficient and was not accepted upstream as it is breaking the current code.
so this what I suggest to be compatible with the future.
- take current git tree
- eventually reset to commit 11035a0567c8726370427e741500b469c3b71876
- rename following files to avoid execution:
testsuite/ltrace.minor/attach-process-dlopen.exp
testsuite/ltrace.main/filters.exp
testsuite/ltrace.main/dwarf.exp
This is what I am proposing to include in debian with bug #bug=744752
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ltrace in Ubuntu.
https://bugs.launchpad.net/bugs/1398143
Title:
Ltrace is broken on ppc64el
Status in ltrace package in Ubuntu:
Triaged
Status in ltrace source package in Trusty:
New
Bug description:
ltrace is not working properly on Ubuntu 15.04 ppc64el.
Example:
ubuntu at ubuntu1504:~$ ltrace `which ls`
__printf_chk(1, 0x3fffd36dce78, 0x3fffd36dce88, 0x3fffd36dcf28 <unfinished ...>
...
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
There is a patch that fixes this issue:
http://lists.alioth.debian.org/pipermail/ltrace-
devel/2014-February/001027.html
In order to get the ppc64el, the idea is to get the upstream tree and do a reset until commit eea4ad2cce289753aaa35b4e0258a76d8f8f367c
That would allow to create a patch of 27514 lines
ppc64el_support:--- ltrace-0.7.3.orig/CREDITS
ppc64el_support:--- ltrace-0.7.3.orig/Makefile.am
ppc64el_support:--- ltrace-0.7.3.orig/NEWS
ppc64el_support:--- ltrace-0.7.3.orig/README
ppc64el_support:--- ltrace-0.7.3.orig/TODO
ppc64el_support:--- ltrace-0.7.3.orig/backend.h
ppc64el_support:--- ltrace-0.7.3.orig/breakpoint.h
ppc64el_support:--- ltrace-0.7.3.orig/breakpoints.c
ppc64el_support:--- ltrace-0.7.3.orig/callback.h
ppc64el_support:--- ltrace-0.7.3.orig/common.h
ppc64el_support:--- ltrace-0.7.3.orig/configure.ac
ppc64el_support:--- ltrace-0.7.3.orig/debug.c
ppc64el_support:--- ltrace-0.7.3.orig/debug.h
ppc64el_support:--- ltrace-0.7.3.orig/demangle.c
ppc64el_support:--- ltrace-0.7.3.orig/demangle.h
ppc64el_support:--- ltrace-0.7.3.orig/dict.c
ppc64el_support:--- ltrace-0.7.3.orig/dict.h
ppc64el_support:--- ltrace-0.7.3.orig/execute_program.c
ppc64el_support:--- ltrace-0.7.3.orig/expr.c
ppc64el_support:--- ltrace-0.7.3.orig/expr.h
ppc64el_support:--- ltrace-0.7.3.orig/fetch.c
ppc64el_support:--- ltrace-0.7.3.orig/fetch.h
ppc64el_support:--- ltrace-0.7.3.orig/filter.h
ppc64el_support:--- ltrace-0.7.3.orig/forward.h
ppc64el_support:--- ltrace-0.7.3.orig/glob.c
ppc64el_support:--- ltrace-0.7.3.orig/handle_event.c
ppc64el_support:--- ltrace-0.7.3.orig/lens_default.c
ppc64el_support:--- ltrace-0.7.3.orig/libltrace.c
ppc64el_support:--- ltrace-0.7.3.orig/library.c
ppc64el_support:--- ltrace-0.7.3.orig/library.h
ppc64el_support:--- ltrace-0.7.3.orig/ltrace-elf.c
ppc64el_support:--- ltrace-0.7.3.orig/ltrace-elf.h
ppc64el_support:--- ltrace-0.7.3.orig/ltrace.1
ppc64el_support:--- ltrace-0.7.3.orig/ltrace.conf.5
ppc64el_support:--- ltrace-0.7.3.orig/ltrace.h
ppc64el_support:--- ltrace-0.7.3.orig/options.c
ppc64el_support:--- ltrace-0.7.3.orig/options.h
ppc64el_support:--- ltrace-0.7.3.orig/output.c
ppc64el_support:--- ltrace-0.7.3.orig/output.h
ppc64el_support:--- ltrace-0.7.3.orig/param.c
ppc64el_support:--- ltrace-0.7.3.orig/param.h
ppc64el_support:--- ltrace-0.7.3.orig/printf.c
ppc64el_support:--- ltrace-0.7.3.orig/proc.c
ppc64el_support:--- ltrace-0.7.3.orig/proc.h
ppc64el_support:--- ltrace-0.7.3.orig/read_config_file.c
ppc64el_support:--- ltrace-0.7.3.orig/read_config_file.h
ppc64el_support:--- ltrace-0.7.3.orig/summary.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/Makefile.am
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/alpha/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/alpha/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/alpha/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/arm/Makefile.am
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/arm/arch.h
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/arm/breakpoint.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/arm/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/arm/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/arm/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/breakpoint.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/cris/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/cris/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/cris/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/events.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/events.h
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ia64/fetch.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ia64/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ia64/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ia64/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/m68k/fetch.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/m68k/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/m68k/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/m68k/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/mips/arch.h
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/mips/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/mips/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/mips/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/os.h
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ppc/arch.h
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ppc/fetch.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ppc/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ppc/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/ppc/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/proc.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/s390/arch.h
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/s390/fetch.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/s390/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/s390/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/s390/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/sparc/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/sparc/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/sparc/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/trace.h
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/x86/arch.h
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/x86/fetch.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/x86/plt.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/x86/regs.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/linux-gnu/x86/trace.c
ppc64el_support:--- ltrace-0.7.3.orig/sysdeps/sysdep.h
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/Makefile.am
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/lib/ltrace.exp
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.main/Makefile.am
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.main/parameters-lib.c
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.main/parameters.c
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.main/parameters.conf
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.main/parameters.exp
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.main/parameters2.exp
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.main/system_calls.exp
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.minor/Makefile.am
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.minor/trace-clone.c
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.minor/trace-exec.exp
ppc64el_support:--- ltrace-0.7.3.orig/testsuite/ltrace.torture/Makefile.am
ppc64el_support:--- ltrace-0.7.3.orig/type.c
ppc64el_support:--- ltrace-0.7.3.orig/type.h
ppc64el_support:--- ltrace-0.7.3.orig/value.c
ppc64el_support:--- ltrace-0.7.3.orig/value.h
ppc64el_support:--- ltrace-0.7.3.orig/vect.c
ppc64el_support:--- ltrace-0.7.3.orig/vect.h
ppc64el_support:--- ltrace-0.7.3.orig/zero.c
from that stage there is a need to apply a patch to avoid dwarf compilation error:
--- ltrace-0.7.3.orig/dwarf_prototypes.h
+++ ltrace-0.7.3/dwarf_prototypes.h
@@ -1,7 +1,6 @@
#pragma once
#include <stdbool.h>
-#include <elfutils/libdwfl.h>
#include "prototype.h"
#include "library.h"
and a patch to configure.ac
--- ltrace-0.7.3.orig/configure.ac
+++ ltrace-0.7.3/configure.ac
@@ -42,7 +43,7 @@ case "${host_cpu}" in
arm*|sa110) HOST_CPU="arm" ;;
cris*) HOST_CPU="cris" ;;
mips*) HOST_CPU="mips" ;;
- powerpc|powerpc64) HOST_CPU="ppc" ;;
+ powerpc|powerpc64|powerpc64le) HOST_CPU="ppc" ;;
sun4u|sparc64) HOST_CPU="sparc" ;;
s390x) HOST_CPU="s390" ;;
i?86|x86_64) HOST_CPU="x86" ;;
let us know if you want a patch or if you get the source from upstream
It may also be required to backport the following patches:
03-alpha-debug.h
06-unexpected-breakpoint
ptrace.diff
Fix to allow compilation of parameters-hfa.exp is
diff --git a/testsuite/lib/ltrace.exp b/testsuite/lib/ltrace.exp
index 9931794..aa9d240 100644
--- a/testsuite/lib/ltrace.exp
+++ b/testsuite/lib/ltrace.exp
@@ -110,6 +110,7 @@ proc ltrace_compile {source dest type options} {
set result [target_compile $source $dest $type $options];
verbose "result is $result"
+ regsub ".* note: .*$" "$result" "" result;
regsub "\[\r\n\]*$" "$result" "" result;
regsub "^\[\r\n\]*" "$result" "" result;
if { $result != "" && [lsearch $options quiet] == -1} {
Current dev git tree reset to commit :
eea4ad2cce289753aaa35b4e0258a76d8f8f367c
or more recent
bc7551c18a2ea7b3baf51a35396fe642066f02e6
are compiling and tested with only 4 errors.
== Comment: #8 - Thierry Fauck <thierry.fauck at fr.ibm.com> - 2014-11-28 11:06:41 ==
New fix to allow full testing:
diff --git a/sysdeps/linux-gnu/ppc/fetch.c b/sysdeps/linux-gnu/ppc/fetch.c
index c9381c3..5c1dc3a 100644
--- a/sysdeps/linux-gnu/ppc/fetch.c
+++ b/sysdeps/linux-gnu/ppc/fetch.c
@@ -378,7 +378,8 @@ allocate_hfa(struct fetch_context *ctx, struct process *proc
/* Hetereogeneous struct - get value on GPR or stack. */
if (((hfa_type == ARGTYPE_FLOAT
|| hfa_type == ARGTYPE_DOUBLE)
- && hfa_count <= 8))
+ && hfa_count <= 8
+ && ctx->struct_hfa_count <= 8 ))
rc = allocate_float(ctx, proc, hfa_info, &tmp,
slot_off, true);
else
== Comment: #9 - Thierry Fauck <thierry.fauck at fr.ibm.com> - 2014-11-28 11:10:36 ==
As last patch allow full tesing with both sources, changing state
Test Run By root on Fri Nov 28 11:08:10 2014
Native configuration is powerpc64le-unknown-linux-gnu
=== tests ===
Schedule of variations:
unix
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
Running ./ltrace.main/branch_func.exp ...
Running ./ltrace.main/filters.exp ...
Running ./ltrace.main/hello-vfork.exp ...
Running ./ltrace.main/main-internal.exp ...
Running ./ltrace.main/main-threaded.exp ...
Running ./ltrace.main/main-vfork.exp ...
Running ./ltrace.main/main.exp ...
Running ./ltrace.main/parameters-hfa.exp ...
Running ./ltrace.main/parameters.exp ...
Running ./ltrace.main/parameters2.exp ...
Running ./ltrace.main/parameters3.exp ...
Running ./ltrace.main/signals.exp ...
Running ./ltrace.main/system_call_params.exp ...
Running ./ltrace.main/system_calls.exp ...
Running ./ltrace.minor/attach-process-dlopen.exp ...
Running ./ltrace.minor/attach-process.exp ...
Running ./ltrace.minor/count-record.exp ...
Running ./ltrace.minor/demangle.exp ...
Running ./ltrace.minor/libdl-simple.exp ...
Running ./ltrace.minor/print-instruction-pointer.exp ...
Running ./ltrace.minor/time-record-T.exp ...
Running ./ltrace.minor/time-record-tt.exp ...
Running ./ltrace.minor/time-record-ttt.exp ...
Running ./ltrace.minor/trace-clone.exp ...
Running ./ltrace.minor/trace-exec.exp ...
Running ./ltrace.minor/trace-fork.exp ...
Running ./ltrace.minor/trace-irelative.exp ...
Running ./ltrace.minor/wchar.exp ...
Running ./ltrace.torture/arm-singlestep.exp ...
Running ./ltrace.torture/ia64-sigill.exp ...
Running ./ltrace.torture/ppc-lwarx.exp ...
Running ./ltrace.torture/signals.exp ...
Running ./ltrace.torture/vfork-thread.exp ...
=== Summary ===
# of expected passes 348
# of unsupported tests 1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ltrace/+bug/1398143/+subscriptions
More information about the foundations-bugs
mailing list