From patchwork Thu Mar 27 19:44:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 320 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (caibbdcaabij.dreamhost.com [208.113.200.189]) by wilcox.dreamhost.com (Postfix) with ESMTP id A67E836056B for ; Thu, 27 Mar 2014 12:44:54 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id 53A8B443444F; Thu, 27 Mar 2014 12:44:54 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id 26D524434460 for ; Thu, 27 Mar 2014 12:44:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=NkU7FQL+Jdvho7Y02Jvr51ptgiZ/A 6JJXkWjMpGtQfi6gGv0P6yJy79HlD40GHX4GKQi3QbPhYZWIxatV1tWd1SHxAsKq yoIXd59Cz9UsJVSlUD1EQl8Me+Rzs06utIUt52CHhOnIZaGkwgurGKJ5m31NIZd/ YRSwvGQr0M5yBo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=SUMuIYUMtf2xWHdmlsRpl59iKmo=; b=ZAW hZy4D/whbT1677ZX5S+Ce0Gl3o3ka7p7xJGfoORsTYSUifRwTDRmv3Tq+fHwDisr 5llKykX6MYNaLjTyYTgJoYyZNHLlSAQZgjtm/OLg78IXJZwPpkRcYu4XtIVH28gR P7v2Budht+Me9lI/f2cuUPTn9D7B+P+6ZeXJs9FE= Received: (qmail 23541 invoked by alias); 27 Mar 2014 19:44:52 -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 23530 invoked by uid 89); 27 Mar 2014 19:44:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oa0-f74.google.com Received: from mail-oa0-f74.google.com (HELO mail-oa0-f74.google.com) (209.85.219.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 27 Mar 2014 19:44:49 +0000 Received: by mail-oa0-f74.google.com with SMTP id i7so848097oag.1 for ; Thu, 27 Mar 2014 12:44:47 -0700 (PDT) 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=DPAJETR5gbYxtsKOETOtM+mcAnBWyvyf6wEhl1WnT1o=; b=FfFTA/pY/accr7wGYrD1Icdx+u0Z/nXpj0buF1/8A9FRyMZ29MSVPolYt2zByV3RYW F3UiAx4f6jT9ObuZijLXDeFTdIAS6wGVbWdAty1Y3jjJ2WVbX6Arw+MS7BkddYoCGYAh jDBcswOrADXTUDXntqXSyu0df3P3dbbCr/7NGsqGxzVHoCyfIZiq2rS6jbOpkVAqUXe8 ZNZwinnCebFhBKvwPfkLt+19tkwR2/b7UK4z+9ek0I31fy2oSS7W1rQVan1Oj7XXfcfD SRlVevYqtQDyNgZ2g2dSyvTyNskv6LjPjvLXJrYxnTr+aAdhFefrH1jsI+3C8M+gkJVa KRVQ== X-Gm-Message-State: ALoCoQkaCOfI9vwTjug/PVG98++PZ35q23BGuKWXQQDpXDgBPn+q67/51C5AEbxoViegyPFEwowQCude9wLyGUIhrmZnmqbjnPq43EXeNHn64r+KjyTlby1PJNhEbOoQnpD/sZhZQnLcqK4kzO5MbdW36MzFRzXSf6LIlzKfuZCsRcpE+5F1SnAsauaucJ7tIDMEwlilcrmhB2BOxE+4WhRozNQuYVugGiMidK7vqHONIMzqVnLgDv4= X-Received: by 10.42.235.206 with SMTP id kh14mr1226136icb.30.1395949487583; Thu, 27 Mar 2014 12:44:47 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id k45si566492yhn.4.2014.03.27.12.44.47 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Mar 2014 12:44:47 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 365145A424D for ; Thu, 27 Mar 2014 12:44:47 -0700 (PDT) From: Doug Evans To: gdb-patches@sourceware.org Subject: [commit] dwarf2read.c (read_str_index): Delete arg cu. Date: Thu, 27 Mar 2014 12:44:46 -0700 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in Hi. fyi, I committed this. Regression tested on amd64-linux. 2014-03-27 Doug Evans * dwarf2read.c (read_str_index): Delete arg cu. All callers updated. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5238f4b..64f7383 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1492,7 +1492,7 @@ static CORE_ADDR read_addr_index_from_leb128 (struct dwarf2_cu *, unsigned int *); static const char *read_str_index (const struct die_reader_specs *reader, - struct dwarf2_cu *cu, ULONGEST str_index); + ULONGEST str_index); static void set_cu_language (unsigned int, struct dwarf2_cu *); @@ -15907,7 +15907,7 @@ read_attribute_value (const struct die_reader_specs *reader, ULONGEST str_index = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); - DW_STRING (attr) = read_str_index (reader, cu, str_index); + DW_STRING (attr) = read_str_index (reader, str_index); DW_STRING_IS_CANONICAL (attr) = 0; info_ptr += bytes_read; } @@ -16443,12 +16443,12 @@ dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu, This is only used by the Fission support. */ static const char * -read_str_index (const struct die_reader_specs *reader, - struct dwarf2_cu *cu, ULONGEST str_index) +read_str_index (const struct die_reader_specs *reader, ULONGEST str_index) { struct objfile *objfile = dwarf2_per_objfile->objfile; const char *objf_name = objfile_name (objfile); bfd *abfd = objfile->obfd; + struct dwarf2_cu *cu = reader->cu; struct dwarf2_section_info *str_section = &reader->dwo_file->sections.str; struct dwarf2_section_info *str_offsets_section = &reader->dwo_file->sections.str_offsets;