From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C2873858429; Sat, 25 Dec 2021 12:19:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C2873858429 From: "panxh_ran at 163 dot com" To: elfutils-devel@sourceware.org Subject: [Bug tools/28725] New: eu-ar -x -N COUNT uses instance [COUNT+1] of name Date: Sat, 25 Dec 2021 12:19:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: tools X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: panxh_ran at 163 dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Dec 2021 12:19:49 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28725 Bug ID: 28725 Summary: eu-ar -x -N COUNT uses instance [COUNT+1] of name Product: elfutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: tools Assignee: unassigned at sourceware dot org Reporter: panxh_ran at 163 dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- Created attachment 13880 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D13880&action=3Ded= it the result of eu-ar -x -N COUNT eu-ar -x -N COUNT should use instance [COUNT] of name,=20 but it uses instance [COUNT+1] of name incorrectly. Usage=EF=BC=9A -N Use instance [COUNT] of name. The attachments show the differences of command result between "eu-ar -x -N COUNT" and "ar -x -N COUNT". do_oper_extract() in src/ar.c Is it should be instance-- at Line522=EF=BC=9F 522 if (res !=3D NULL && (instance < 0 || instance-- =3D=3D 0) 523 && !found[(char **) res->data - argv]) 524 found[(char **) res->data - argv] =3D do_extract =3D true; 525 } --=20 You are receiving this mail because: You are on the CC list for the bug.=