Emitting line number debug info for non-code sections
Geoff Berry
geoffb@bops.com
Tue Sep 11 11:30:00 GMT 2001
Does the following patch make sense to apply? I ran into a problem where
generate_lineno_debug was being called for a line in a data section that
contained a macro call. On the target I'm working with, the text and data
segments get mapped to overlapping memory regions, so this could potentially
cause multiple line numbers to be emitted for the same address.
--- gas/read.c Tue Sep 11 13:13:26 2001
+++ gas/read.c Tue Sep 11 12:30:26 2001
@@ -5154,6 +4970,11 @@
void
generate_lineno_debug ()
{
+ /* Don't generate line number debugging information if we aren't in
+ a code section. */
+ if (! subseg_text_p (now_seg))
+ return;
+
switch (debug_type)
{
case DEBUG_UNSPECIFIED:
More information about the Binutils
mailing list