From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21173 invoked by alias); 9 Jun 2009 21:22:46 -0000 Received: (qmail 21161 invoked by uid 22791); 9 Jun 2009 21:22:45 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Jun 2009 21:22:40 +0000 Received: from spaceape23.eur.corp.google.com (spaceape23.eur.corp.google.com [172.28.16.75]) by smtp-out.google.com with ESMTP id n59LMbcO009053 for ; Tue, 9 Jun 2009 22:22:37 +0100 Received: from an-out-0708.google.com (ancc2.prod.google.com [10.100.29.2]) by spaceape23.eur.corp.google.com with ESMTP id n59LMZCu012100 for ; Tue, 9 Jun 2009 14:22:35 -0700 Received: by an-out-0708.google.com with SMTP id c2so130949anc.35 for ; Tue, 09 Jun 2009 14:22:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.251.7 with SMTP id y7mr624230anh.127.1244582555200; Tue, 09 Jun 2009 14:22:35 -0700 (PDT) Date: Tue, 09 Jun 2009 21:22:00 -0000 Message-ID: Subject: [patch] Add support for DW_LNE_set_discriminator From: Cary Coutant To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00247.txt.bz2 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"));