aboutsummaryrefslogtreecommitdiff
path: root/gas/macro.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-08-30 11:21:58 +0200
committerJan Beulich <jbeulich@suse.com>2024-08-30 11:21:58 +0200
commit4f14f47e0ce4c95f50f36fbf7b01ad1ecf136d38 (patch)
tree65eedecc5794fddb91090b5fddada5ca0a107932 /gas/macro.c
parent358ada8bc5c39c1d18f1e36b0402d5a0e04228ec (diff)
downloadgdb-4f14f47e0ce4c95f50f36fbf7b01ad1ecf136d38.zip
gdb-4f14f47e0ce4c95f50f36fbf7b01ad1ecf136d38.tar.gz
gdb-4f14f47e0ce4c95f50f36fbf7b01ad1ecf136d38.tar.bz2
gas: generated code/data listing output vs .endr and alike
These ending directives are swallowed by buffer_and_nest() and hence aren't seen by read_a_source_file(). Thus they also weren't announced to the listing subsystem. That was, when macro expansions are included, thus misguided to associate possible output resulting from the first line of the construct being expanded with both the .endr and that first line (i.e. showing it twice).
Diffstat (limited to 'gas/macro.c')
-rw-r--r--gas/macro.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gas/macro.c b/gas/macro.c
index d0c90d3..8b376f7 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -220,6 +220,11 @@ buffer_and_nest (const char *from, const char *to, sb *ptr,
{
/* Reset the string to not include the ending rune. */
ptr->len = line_start;
+
+ /* With the ending directive consumed here, announce the
+ line for macro-expanded listings. */
+ if (listing & LISTING_MACEXP)
+ listing_newline (NULL);
break;
}
}