public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed] sim: m32c: fix initial #line number in generated code
@ 2023-12-22  1:18 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2023-12-22  1:18 UTC (permalink / raw)
  To: gdb-patches

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)
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-22  1:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-22  1:18 [PATCH/committed] sim: m32c: fix initial #line number in generated code Mike Frysinger

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).