From patchwork Wed Nov 26 22:54:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 3964 Received: (qmail 8493 invoked by alias); 26 Nov 2014 22:54:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 8481 invoked by uid 89); 26 Nov 2014 22:54:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-qa0-f73.google.com Received: from mail-qa0-f73.google.com (HELO mail-qa0-f73.google.com) (209.85.216.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 26 Nov 2014 22:54:38 +0000 Received: by mail-qa0-f73.google.com with SMTP id j7so211151qaq.0 for ; Wed, 26 Nov 2014 14:54:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-type; bh=pkfSS6qcJxThQZaPDRhBtzAXnmEuBBmsv5rabqg4XHE=; b=I2ZT7QwDb+GMaObYRtY+JjQ9tOctyobmWWt7mQ6m5GrLdi2OQBPGPIifEeehSIdawz 03Gj8j4bsMKIOh9wr9T4LwJtwb7OZmnQpO87hSokNQEdVQ0SWxYQwKNkJhe2ORmAh8eB kazgM685a83xY/u/jHHyq8SESuGF4YhuF98Emq254mDJO7+1d+YuEuJS9O+VVcW5GIZT E7Eyc0W94xmxiBviZr54Jes/16+Mll0onbvMOv5dcoFoS21XzPIBmQMfoQRcuyARwyPS UCQJEvh4kwzoJO8JHcrs/BPS35Yl1yq8Dkrc3e7StMvh7fY0fDUXo+aKeHtoXEQU2gPU qcag== X-Gm-Message-State: ALoCoQnCcfL/XhGrTPkIGtl42K4nGHiRP+BK4xyrG1l2aDxb/Uu1lXMSr4EI++3KUrlR+MCi3X2xIVSjiB9OK6y7QyHT5gi/TrIEGIAb+1/RqxiEX2f7t1jpowZc4fe6FgZLMRQbDqC3JqUcqU8hrGuiqEOuJkRLaC8Oz0FU1reQcTuOsLyBTzU= X-Received: by 10.224.14.147 with SMTP id g19mr33331496qaa.4.1417042476637; Wed, 26 Nov 2014 14:54:36 -0800 (PST) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id t28si220687yhb.4.2014.11.26.14.54.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Nov 2014 14:54:36 -0800 (PST) Received: from ruffy.mtv.corp.google.com ([172.17.128.44]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTPS id 74wL3teX.1; Wed, 26 Nov 2014 14:54:36 -0800 From: Doug Evans To: gdb-patches@sourceware.org Subject: [PATCH] dwarf2read.c (peek_die_abbrev): Improve error message text. Date: Wed, 26 Nov 2014 14:54:35 -0800 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hi. This patch improves the text of an error message. I happened to trip over this, and it was useful to know the bogus CU from the error text. 2014-11-26 Doug Evans * dwarf2read.c (peek_die_abbrev): Improve error message text. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 36cbbd9..5526db3 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -7130,8 +7130,10 @@ peek_die_abbrev (const gdb_byte *info_ptr, unsigned int *bytes_read, abbrev = abbrev_table_lookup_abbrev (cu->abbrev_table, abbrev_number); if (!abbrev) { - error (_("Dwarf Error: Could not find abbrev number %d [in module %s]"), - abbrev_number, bfd_get_filename (abfd)); + error (_("Dwarf Error: Could not find abbrev number %d in %s" + " at offset 0x%x [in module %s]"), + abbrev_number, cu->per_cu->is_debug_types ? "TU" : "CU", + cu->header.offset.sect_off, bfd_get_filename (abfd)); } return abbrev;