aboutsummaryrefslogtreecommitdiff
path: root/opcodes/opc2c.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-08-17 11:51:44 +0930
committerAlan Modra <amodra@gmail.com>2015-08-17 12:07:12 +0930
commit919b75f7e28942fe320dc533759f88131f160bf3 (patch)
tree4ebcf1b62752af990aae03c497539c41a8a73a5e /opcodes/opc2c.c
parent26a4b92c9131ab952f3db9bcafa82fb2360d19b6 (diff)
downloadgdb-919b75f7e28942fe320dc533759f88131f160bf3.zip
gdb-919b75f7e28942fe320dc533759f88131f160bf3.tar.gz
gdb-919b75f7e28942fe320dc533759f88131f160bf3.tar.bz2
Trailing space in opcodes/ generated files
HJ recently removed trailing space in binutils files, but unfortunately they return when regenerating files in opcodes. This fixes the regen process. * cgen.sh: Trim trailing space from cgen output. * ia64-gen.c (print_dependency_table): Don't generate trailing space. (print_dis_table): Likewise. * opc2c.c (dump_lines): Likewise. (orig_filename): Warning fix. * ia64-asmtab.c: Regenerate.
Diffstat (limited to 'opcodes/opc2c.c')
-rw-r--r--opcodes/opc2c.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/opcodes/opc2c.c b/opcodes/opc2c.c
index ce8d70e..6ded918 100644
--- a/opcodes/opc2c.c
+++ b/opcodes/opc2c.c
@@ -121,7 +121,7 @@ int n_varies = 0;
unsigned char cur_bits[MAX_BYTES + 1];
-char * orig_filename;
+const char * orig_filename;
FILE * sim_log = NULL;
#define lprintf if (sim_log) fprintf
@@ -339,7 +339,10 @@ dump_lines (opcode * op, int level, Indirect * ind)
printf ("#line %d \"%s\"\n", op->lineno + 1, orig_filename);
for (i = 0; i < op->nlines; i++)
- printf ("%*s%s", level, "", op->lines[i]);
+ if (op->lines[i][0] == '\n')
+ printf ("%s", op->lines[i]);
+ else
+ printf ("%*s%s", level, "", op->lines[i]);
if (op->comment)
printf ("%*s}\n", level, "");