From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3484 invoked by alias); 19 May 2014 08:07:31 -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 3458 invoked by uid 89); 19 May 2014 08:07:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga09.intel.com Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 May 2014 08:07:27 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 19 May 2014 01:02:19 -0700 X-ExtLoop1: 1 Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga002.jf.intel.com with ESMTP; 19 May 2014 01:07:10 -0700 Received: from irsmsx108.ger.corp.intel.com (163.33.3.3) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 19 May 2014 09:05:37 +0100 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.98]) by IRSMSX108.ger.corp.intel.com ([169.254.11.221]) with mapi id 14.03.0123.003; Mon, 19 May 2014 09:05:37 +0100 From: "Metzger, Markus T" To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] btrace, vdso: add vdso target sections Date: Mon, 19 May 2014 08:07:00 -0000 Message-ID: References: <1396601586-24380-1-git-send-email-markus.t.metzger@intel.com> <53760BDF.2080500@redhat.com> In-Reply-To: <53760BDF.2080500@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00332.txt.bz2 > -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] On Behalf Of Pedro Alves > Sent: Friday, May 16, 2014 3:00 PM Thanks for your review. > Looks largely fine, but ... >=20 > On 04/04/2014 09:53 AM, Markus Metzger wrote: >=20 > > @@ -131,6 +133,27 @@ symbol_file_add_from_memory (struct bfd > *templ, CORE_ADDR addr, > > from_tty ? SYMFILE_VERBOSE : 0, > > sai, OBJF_SHARED, NULL); > > > > + if (add_sections) > > + { > ... >=20 > Why is this conditional? Why not add the sections if the symbols are > added manually with add-symbol-file-from-memory? The use case for the > command was originally exactly to add the vdso's symbols to GDB. This function is used by the add-symbol-file-from-memory command, as well. I'm not sure if we want to add the target sections there, as well. > > +# trace the test code > > +gdb_test_no_output "record btrace" > > +gdb_test "next" >=20 > Please add a pattern that makes sure the "next" actually > finished successfully. OK. > > +# disassemble the code around the current PC > > +gdb_test "disassemble \$pc, +10" [join [list \ > > + ".*" \ > > + "End of assembler dump\." \ > > + ] "\r\n"] >=20 > What is the error one gets without the fix? Doesn't > GDB say "End of assembler dump" in that case too? No. GDB says "Cannot access memory at address ...". Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052