public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tristan Gingold <gingold@adacore.com>
To: Michael Eager <eager@eagerm.com>
Cc: binutils Development <binutils@sourceware.org>
Subject: Re: [Patch]: Improve handling of DW_LNE_define_file
Date: Thu, 19 Jan 2012 13:59:00 -0000	[thread overview]
Message-ID: <D55FC6C6-9539-4794-95B7-F637D4AFC1AF@adacore.com> (raw)
In-Reply-To: <4F181B62.6000102@eagerm.com>


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;

      parent reply	other threads:[~2012-01-19 13:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 12:05 Tristan Gingold
2012-01-16 22:16 ` Alan Modra
2012-01-19 11:35   ` Tristan Gingold
2012-01-19 13:32 ` Michael Eager
2012-01-19 13:53   ` Tristan Gingold
2012-01-19 13:59   ` Tristan Gingold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D55FC6C6-9539-4794-95B7-F637D4AFC1AF@adacore.com \
    --to=gingold@adacore.com \
    --cc=binutils@sourceware.org \
    --cc=eager@eagerm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).