This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix for failures in mips gas tests due to discriminator change


Missing initialization caused failures for the mips target.

Tested for mipsisa32r2el-unknown-linux-gnu. Ok for trunk?

Thanks,
Teresa

2012-07-25  Teresa Johnson  <tejohnson@google.com>

        * bfd/dwarf2.c (find_line): Initialize discriminator_ptr
        if it is non-NULL.

Index: bfd/dwarf2.c
===================================================================
RCS file: /cvs/src/src/bfd/dwarf2.c,v
retrieving revision 1.149
diff -u -p -r1.149 dwarf2.c
--- bfd/dwarf2.c        24 Jul 2012 21:06:57 -0000      1.149
+++ bfd/dwarf2.c        26 Jul 2012 02:13:43 -0000
@@ -3344,6 +3344,8 @@ find_line (bfd *abfd,
   if (functionname_ptr != NULL)
     *functionname_ptr = NULL;
   *linenumber_ptr = 0;
+  if (discriminator_ptr)
+    *discriminator_ptr = 0;

   if (! _bfd_dwarf2_slurp_debug_info (abfd, NULL,
                                      debug_sections, symbols, pinfo))



On Wed, Jul 25, 2012 at 4:22 PM, Hans-Peter Nilsson
<hans-peter.nilsson@axis.com> wrote:
>
> My autotester complains, for mipsisa32r2el-unknown-linux-gnu
> cross from a x86_64-linux host:
>
> Running /tmp/hpautotest-binutils/bsrc/src/gas/testsuite/gas/mips/mips.exp ...
> FAIL: assembly line numbers
>
> The time this regression started
> (2012-07-24-13:49:25..2012-07-24-21:07:06 UTC), seems to
> coincide with your line number patch:
>
> 2012-07-24  Teresa Johnson  <tejohnson@google.com>
>
>         * addr2line.c (find_address_in_section): Invoke
>         bfd_find_nearest_line_discriminator to get the discriminator.
>         (find_offset_in_section): Likewise.
>         (translate_addresses): Print discriminator if it is non-zero.
>         * objdump.c (show_line): Invoke
>         bfd_find_nearest_line_discriminator to get the discriminator,
>         and keep track of prev_discriminator. Print discriminator
>         if it is non-zero.
>         (disassemble_data): Initialize prev_discriminator.
>         (dump_reloc_set): Invoke bfd_find_nearest_line_discriminator
>         to get the discriminator, and keep track of last_discriminator.
>         Print discriminator if it is non-zero.
>
> Please look into it.  Thanks.
>
> brgds, H-P




--
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]