From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26089 invoked by alias); 18 Mar 2015 19:10:29 -0000 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 Received: (qmail 26075 invoked by uid 89); 18 Mar 2015 19:10:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 18 Mar 2015 19:10:27 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 890658E758 for ; Wed, 18 Mar 2015 19:10:26 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2IJAOID016771; Wed, 18 Mar 2015 15:10:25 -0400 Message-ID: <5509CD9F.8060803@redhat.com> Date: Wed, 18 Mar 2015 19:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Sergio Durigan Junior CC: GDB Patches , Jan Kratochvil , Oleg Nesterov Subject: Re: [PATCH v2] Improve corefile generation by using /proc/PID/coredump_filter (PR corefile/16902) References: <878ufc9kau.fsf@redhat.com> <87r3stnbdw.fsf@redhat.com> <55033BD3.8060800@redhat.com> <871tko8pom.fsf@redhat.com> In-Reply-To: <871tko8pom.fsf@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00553.txt.bz2 On 03/16/2015 11:53 PM, Sergio Durigan Junior wrote: > To summarize: I decided to change this part of the code, and make GDB > actually ignore (i.e., return 0) mappings marked as UNMODIFIED. After > all, as explained above, this is what Linux does. I can't tell whether we'll still need the UNKNOWN state after that, but offhand, if a mapping isn't supposed to be dumped, why not just skip calling the callback (gcore_create_callback)? > >> >>> + >>> +foreach item $all_corefiles { >>> + foreach name [list [lindex $item 3] [lindex $item 4]] { >>> + set test "print/x $name" >>> + gdb_test_multiple $test $test { >>> + -re " = \($hex\)\r\n$gdb_prompt $" { >>> + set addr($name) $expect_out(1,string) >> >> I'm probably being dense, but I can't see where is addr >> ever used? > > 'addr' is an associative array that maps variable names to addresses. > This is needed because sometimes (depending on which pags we > dump/ignore), the stack is not dumped and GDB would not be able to find > the variable names; therefore, this dependency is removed here. Ah, it's used in do_load_and_test_core. Somehow missed that the first time. > I will not send the full patch again because I intend to split it into > minor, more logical patches. I should be able to send it later > today/tomorrow. Thanks, Pedro Alves