Package: binutils Version: 2.21.51.20110601-1 Severity: wishlist Hi,
It is very tempting for people to report toolchains in the terms of their own experience, like "Building frobber makes ld segfault". Which is good for us to know, so I wouldn't like to dissuade such people, but it's not a good starting point for later investigation. A more convenient report, as binutils/README in the source tree explains, will include the immediate input files used to trigger the problem and a command line explaining how to reproduce it. That has many benefits: - investigators don't have to track down where to find the source of frobber and binaries for its dependencies on the affected platform; - it makes the problem reproducible, without depending on details of the higher-level toolchain used to create the input; - it gives the reporter a chance to make a more minimal testcase and think of the problem in terms of what ld is doing. Maybe someone will tweak the commandline and be able to find an even more well defined bug: "using -z foo causes ld to segfault". On the other hand, receiving multi-megabyte files by email is never fun, and the wording below could probably use some tweaking in other ways. What do you think? It would also be nice to install binutils/README (and similar files) verbatim under /usr/share/doc somewhere. I'll file another bug for that if a spare moment comes to write a patch for it. --- debian/binutils.presubj | 25 +++++++++++++++++++++++++ debian/changelog | 8 ++++++++ debian/rules | 20 ++++++++++++++++++++ 3 files changed, 53 insertions(+), 0 deletions(-) create mode 100644 debian/binutils.presubj diff --git a/debian/binutils.presubj b/debian/binutils.presubj new file mode 100644 index 0000000..430e6e4 --- /dev/null +++ b/debian/binutils.presubj @@ -0,0 +1,25 @@ +When reporting binutils errors, please provide the actual input files +and options given to the tool (gas, objcopy, ld, etc.) at run time. +This can mean the difference between a pleasant debugging experience +and a heisenbug that becomes unreproducible when gcc's code generation +changes. + +For example, to create a testcase for an "ld" problem, first find the +"gcc" command line that triggers the error: + + $ make + ... output ending in an error ... + $ make V=1 VERBOSE=1 2>&1 | head -1 + +Add "-v" after gcc and run it again. One of the early output lines +will be an invocation of collect2. Replace collect2 with "ld" and +it should reproduce the same error. If you collect all the objects +(including system libraries) mentioned on the "ld" command line in a +tarball and send it along with the ld command line then that is a +testcase. + +A possible step after that is to try omitting some objects from the +ld command line and see if it still triggers the same error, but +that's just icing on the cake. + +Happy debugging! diff --git a/debian/changelog b/debian/changelog index 1f9e994..761bf53 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +binutils (2.21.51.20110601-1.1) local; urgency=low + + * Add a /usr/share/bug/binutils/presubj file for reportbug (and symlinks + from the other /usr/share/bug/binutils-foo directories) explaining how + to make a self-contained testcase. + + -- Jonathan Nieder <jrnie...@gmail.com> Fri, 03 Jun 2011 16:41:38 -0500 + binutils (2.21.51.20110601-1) experimental; urgency=low * Snapshot, taken from the trunk 20110601. diff --git a/debian/rules b/debian/rules index 41ec64c..2d08cfb 100755 --- a/debian/rules +++ b/debian/rules @@ -919,6 +919,26 @@ else $$i > $${i%*.in}; \ done + : # install bug reporting information + $(install_file) -D debian/$(p_bin).presubj \ + $(d_bin)/$(PF)/share/bug/$(p_bin)/presubj +ifeq ($(with_multiarch),yes) + $(install_dir) $(d_mul)/$(PF)/share/bug + ln -sf $(p_bin) $(d_mul)/$(PF)/share/bug/$(p_mul) +endif +ifeq ($(with_gold),yes) + $(install_dir) $(d_gold)/$(PF)/share/bug + ln -sf $(p_bin) $(d_gold)/$(PF)/share/bug/$(p_gold) +endif +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc ppc64)) + $(install_dir) $(d_spu)/$(PF)/share/bug + ln -sf $(p_bin) $(d_spu)/$(PF)/share/bug/$(p_spu) +endif +ifeq ($(DEB_HOST_ARCH),hppa) + $(install_dir) $(d_hppa64)/$(PF)/share/bug + ln -sf $(p_bin) $(d_hppa64)/$(PF)/share/bug/$(p_hppa64) +endif + : # make lintian happy $(install_file) -D debian/$(p_bin).overrides \ $(d_bin)/$(PF)/share/lintian/overrides/$(p_bin) -- 1.7.5.3 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org