This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch]: Improve handling of DW_LNE_define_file
On Jan 19, 2012, at 2:32 PM, Michael Eager wrote:
> On 01/12/2012 04:05 AM, Tristan Gingold wrote:
>
>> index a775818..08f472f 100644
>> --- a/binutils/dwarf.c
>> +++ b/binutils/dwarf.c
>
>> @@ -288,7 +289,11 @@ process_extended_line_op (unsigned char *data, int is_stmt)
>> printf ("%s\t", dwarf_vmatoa ("u", read_leb128 (data,& bytes_read, 0)));
>> data += bytes_read;
>> printf ("%s\t", dwarf_vmatoa ("u", read_leb128 (data,& bytes_read, 0)));
>> - printf ("%s\n\n", name);
>> + data += bytes_read;
>> + printf ("%s", name);
>> + if (data - orig_data != len)
>
> This should be
> if ((unsigned int) (data - orig_data) != len)
> or change len to "int".
>
> I prefer changing len. I can check in obvious patch.
I committed this:
Thank you for noticing this.
Tristan.
2012-01-19 Tristan Gingold <gingold@adacore.com>
* dwarf.c (process_extended_line_op): Add a cast to silent a
warning.
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.106
diff -c -r1.106 dwarf.c
*** dwarf.c 19 Jan 2012 11:34:44 -0000 1.106
--- dwarf.c 19 Jan 2012 13:57:55 -0000
***************
*** 291,297 ****
printf ("%s\t", dwarf_vmatoa ("u", read_leb128 (data, & bytes_read, 0)));
data += bytes_read;
printf ("%s", name);
! if (data - orig_data != len)
printf (_(" [Bad opcode length]"));
printf ("\n\n");
break;
--- 291,297 ----
printf ("%s\t", dwarf_vmatoa ("u", read_leb128 (data, & bytes_read, 0)));
data += bytes_read;
printf ("%s", name);
! if ((unsigned int) (data - orig_data) != len)
printf (_(" [Bad opcode length]"));
printf ("\n\n");
break;