From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 906743851C03 for ; Wed, 13 May 2020 17:12:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 906743851C03 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-106-yp4DQqAeOXCjupS2tVdd5A-1; Wed, 13 May 2020 13:12:45 -0400 X-MC-Unique: yp4DQqAeOXCjupS2tVdd5A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C59E6107ACCD for ; Wed, 13 May 2020 17:12:44 +0000 (UTC) Received: from f31-1.lan (ovpn-112-112.phx2.redhat.com [10.3.112.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A34610013D9; Wed, 13 May 2020 17:12:44 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Subject: [PATCH v2 0/5] Fix BZ 25631 - core file memory access problem Date: Wed, 13 May 2020 10:11:50 -0700 Message-Id: <20200513171155.645761-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 17:12:52 -0000 This series fixes a bug with accessing memory from core files. The bug can be viewed here... https://sourceware.org/bugzilla/show_bug.cgi?id=25631 ...though I also provide similar details in part 4 of this series. It incorporates suggestions made by Keith and Pedro in their reviews. The biggest change from v1 is that the section splitting code that I introduced in v1 has been entirely removed. Instead, I now pass a predicate to section_table_xfer_memory as suggested by Pedro. Pedro has asked me to write another test case for a problem that he found while reviewing v1. I will attempt to do that, but I wanted to post this patch series so that review can start sooner. If I manage to create a good test, I'll post that separately. Kevin Buettner (5): Remove hack for GDB which sets the section size to 0 Adjust corefile.exp test to show regression after bfd hack removal section_table_xfer_memory: Replace section name with callback predicate Provide access to non SEC_HAS_CONTENTS core file sections Test ability to access unwritten-to mmap data in core file bfd/elf.c | 8 ----- gdb/bfd-target.c | 3 +- gdb/corelow.c | 48 ++++++++++++++++++++++++----- gdb/exec.c | 8 ++--- gdb/exec.h | 13 ++++++-- gdb/target.c | 18 ++++++++--- gdb/testsuite/gdb.base/corefile.exp | 6 ++++ gdb/testsuite/gdb.base/coremaker.c | 16 ++++++++++ 8 files changed, 91 insertions(+), 29 deletions(-) -- 2.25.4