From patchwork Fri Dec 22 01:18:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82713 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0048F3858402 for ; Fri, 22 Dec 2023 01:18:19 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 74A7C3858C66 for ; Fri, 22 Dec 2023 01:18:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 74A7C3858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 74A7C3858C66 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703207887; cv=none; b=N8+pdJsb11XIGGTtC2QoiGx0BCpg1tVnYZhNXh23aHymPI7ornsYnpS4AAdBdFZDD15FFUKlzS4UfuzXHzQD7mOq+UdSr0Kb3KxV1+6zQ+ipEgtRblaCyKXUG/CWRQTZHDWkMQKSxU0ZGqz1ArApFJDLvtQdC1oZJ+OUbpvLbEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703207887; c=relaxed/simple; bh=zZu3UONnu+odCQnBr5Jn26Mop1iFlpR4flNM4kNcDYI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=mtgwHAxkXPhhFbllvpcdILQxgVa7U5RoEbstLBPjrP3bU0Sgs6VfXB838TMI7CvZ3bQR0vfxNd6UORgzhn30fB5e2gKcxte38OlcUP4g7M/ZZOCWn6Pg8/TXAH3VNfv40UT4Uh52dt8ganpEiz+vcffVklJS8Z8zmp3jnqrv1uA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id F09AE340943; Fri, 22 Dec 2023 01:18:05 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed] sim: m32c: fix initial #line number in generated code Date: Thu, 21 Dec 2023 20:18:03 -0500 Message-ID: <20231222011803.27861-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org This emits #line 2 for the first line in the output when it should be 1. --- sim/m32c/opc2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/m32c/opc2c.c b/sim/m32c/opc2c.c index da4da1c2a97f..113e39072abe 100644 --- a/sim/m32c/opc2c.c +++ b/sim/m32c/opc2c.c @@ -282,7 +282,7 @@ dump_lines (opcode * op, int level, Indirect * ind) varnames[i], (i < vn - 1) ? "," : "\\n", varnames[i]); printf ("%*s }\n", level, ""); } - printf ("#line %d \"%s\"\n", op->lineno + 1, orig_filename); + printf ("#line %d \"%s\"\n", op->lineno, orig_filename); for (i = 0; i < op->nlines; i++) printf ("%*s%s", level, "", op->lines[i]); if (op->comment)