2014-12-01 19:29:11 |
bugproxy |
bug |
|
|
added bug |
2014-12-01 19:29:14 |
bugproxy |
tags |
|
architecture-ppc64le bugnameltc-119208 severity-high targetmilestone-inin1504 |
|
2014-12-01 19:36:19 |
Luciano Chavez |
affects |
ubuntu |
ltrace (Ubuntu) |
|
2015-01-26 13:50:31 |
Breno Leitão |
ltrace (Ubuntu): status |
New |
Confirmed |
|
2015-01-26 13:50:55 |
Breno Leitão |
ltrace (Ubuntu): assignee |
|
Taco Screen team (taco-screen-team) |
|
2015-02-26 17:29:34 |
Steve Langasek |
ltrace (Ubuntu): importance |
Undecided |
High |
|
2015-02-26 17:30:01 |
Steve Langasek |
ltrace (Ubuntu): status |
Confirmed |
Triaged |
|
2015-02-26 17:30:08 |
Steve Langasek |
nominated for series |
|
Ubuntu Trusty |
|
2015-02-26 17:30:08 |
Steve Langasek |
bug task added |
|
ltrace (Ubuntu Trusty) |
|
2015-02-26 17:30:59 |
Steve Langasek |
ltrace (Ubuntu Trusty): importance |
Undecided |
Low |
|
2015-03-02 20:09:08 |
Steve Langasek |
ltrace (Ubuntu): assignee |
Taco Screen team (taco-screen-team) |
Adam Conrad (adconrad) |
|
2015-04-26 19:33:05 |
Adam Conrad |
bug watch added |
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744752 |
|
2016-04-05 18:30:41 |
Steve Langasek |
ltrace (Ubuntu): assignee |
Adam Conrad (adconrad) |
Mathieu Trudel-Lapierre (cyphermox) |
|
2016-04-12 00:56:27 |
Mathieu Trudel-Lapierre |
ltrace (Ubuntu): status |
Triaged |
In Progress |
|
2016-04-12 06:50:28 |
Launchpad Janitor |
ltrace (Ubuntu): status |
In Progress |
Fix Released |
|
2016-05-19 21:41:35 |
Mathieu Trudel-Lapierre |
description |
ltrace is not working properly on Ubuntu 15.04 ppc64el.
Example:
ubuntu@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@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@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 |
[Impact]
ppc64el users of ltrace.
[Test case]
See below.
[Regression potential]
While the changes should fix some of the more common uses of ltrace, the added/modified methods and options may break for some specific calls on ppc64el, or on other architectures (powerpc, arm) which are affected by the changes.
ARM was already failing with the available version of ltrace; this would not change the behavior on ARM.
---
ltrace is not working properly on Ubuntu 15.04 ppc64el.
Example:
ubuntu@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@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@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 |
|
2016-05-19 21:42:46 |
Mathieu Trudel-Lapierre |
description |
[Impact]
ppc64el users of ltrace.
[Test case]
See below.
[Regression potential]
While the changes should fix some of the more common uses of ltrace, the added/modified methods and options may break for some specific calls on ppc64el, or on other architectures (powerpc, arm) which are affected by the changes.
ARM was already failing with the available version of ltrace; this would not change the behavior on ARM.
---
ltrace is not working properly on Ubuntu 15.04 ppc64el.
Example:
ubuntu@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@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@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 |
[Impact]
ppc64el users of ltrace.
[Test cases]
- ltrace `which ls`
- ltrace /bin/ls /usr
- ltrace ps
- ltrace make (building ltrace itself, for instance)
[Regression potential]
While the changes should fix some of the more common uses of ltrace, the added/modified methods and options may break for some specific calls on ppc64el, or on other architectures (powerpc, arm) which are affected by the changes.
ARM was already failing with the available version of ltrace; this would not change the behavior on ARM.
---
ltrace is not working properly on Ubuntu 15.04 ppc64el.
Example:
ubuntu@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@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@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 |
|
2016-05-19 21:44:35 |
Mathieu Trudel-Lapierre |
nominated for series |
|
Ubuntu Wily |
|
2016-05-19 21:44:35 |
Mathieu Trudel-Lapierre |
bug task added |
|
ltrace (Ubuntu Wily) |
|
2016-05-19 21:44:53 |
Mathieu Trudel-Lapierre |
ltrace (Ubuntu Wily): importance |
Undecided |
Low |
|
2016-05-19 21:44:56 |
Mathieu Trudel-Lapierre |
ltrace (Ubuntu Trusty): assignee |
|
Mathieu Trudel-Lapierre (cyphermox) |
|
2016-05-19 21:44:59 |
Mathieu Trudel-Lapierre |
ltrace (Ubuntu Wily): assignee |
|
Mathieu Trudel-Lapierre (cyphermox) |
|
2016-05-19 21:45:03 |
Mathieu Trudel-Lapierre |
ltrace (Ubuntu Trusty): status |
New |
In Progress |
|
2016-05-24 21:19:44 |
Martin Pitt |
ltrace (Ubuntu Wily): status |
New |
Won't Fix |
|
2016-07-01 06:47:16 |
Martin Pitt |
ltrace (Ubuntu Trusty): status |
In Progress |
Incomplete |
|