Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Add support for DW_LNE_set_discriminator
@ 2009-06-09 21:22 Cary Coutant
  2009-06-09 23:59 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Cary Coutant @ 2009-06-09 21:22 UTC (permalink / raw)
  To: gdb-patches

The discriminator patches that I recently submitted to gcc, gas, and
binutils introduced a bunch of gdb testsuite failures, and I'm
embarrassed to admit that I neglected to run the gdb testsuite before
I checked in the gcc patch. I expected all dwarf consumers to ignore
any unknown opcodes, but it turns out that gdb doesn't do that. This
patch adds support for the new opcode.

One question, though. I've written the patch to maintain the
philosophy that gdb will complain about any unknown extended opcodes,
and will give up on processing the remainder of the line number table.
I could change default case in dwarf_decode_lines() to just skip over
unknown extended opcodes, instead of adding the explicit case for the
one new opcode. Which would be preferable?

-cary


* dwarf2read.c (dwarf_decode_lines): Recognize and ignore
DW_LNE_set_discriminator.


Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.306
diff -u -p -r1.306 dwarf2read.c
--- dwarf2read.c	4 Jun 2009 12:28:39 -0000	1.306
+++ dwarf2read.c	9 Jun 2009 20:40:54 -0000
@@ -7357,6 +7357,11 @@ dwarf_decode_lines (struct line_header *
                     add_file_name (lh, cur_file, dir_index, mod_time, length);
                   }
 		  break;
+		case DW_LNE_set_discriminator:
+		  /* The discriminator is not interesting to the debugger;
+		     just ignore it.  */
+		  line_ptr = extended_end;
+		  break;
 		default:
 		  complaint (&symfile_complaints,
 			     _("mangled .debug_line section"));


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-10 14:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-09 21:22 [patch] Add support for DW_LNE_set_discriminator Cary Coutant
2009-06-09 23:59 ` Tom Tromey
2009-06-10 14:03   ` Cary Coutant
2009-06-10 14:36     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox