From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2001 invoked by alias); 16 May 2014 13:12:08 -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 1986 invoked by uid 89); 16 May 2014 13:12:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS 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 ESMTP; Fri, 16 May 2014 13:12:06 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4GDC40V032150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 May 2014 09:12:04 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4GD0FJ2008099; Fri, 16 May 2014 09:00:16 -0400 Message-ID: <53760BDF.2080500@redhat.com> Date: Fri, 16 May 2014 13:12:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Markus Metzger CC: gdb-patches@sourceware.org Subject: Re: [PATCH] btrace, vdso: add vdso target sections References: <1396601586-24380-1-git-send-email-markus.t.metzger@intel.com> In-Reply-To: <1396601586-24380-1-git-send-email-markus.t.metzger@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-05/txt/msg00282.txt.bz2 Hi Markus, Sorry for the delay... Looks largely fine, but ... On 04/04/2014 09:53 AM, Markus Metzger wrote: > @@ -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) > + { ... 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 might change our ideas about frames already looked at. */ > reinit_frame_cache (); > > @@ -159,7 +182,7 @@ add_symbol_file_from_memory_command (char *args, int from_tty) > error (_("Must use symbol-file or exec-file " > "before add-symbol-file-from-memory.")); > > - symbol_file_add_from_memory (templ, addr, 0, NULL, from_tty); > + symbol_file_add_from_memory (templ, addr, 0, NULL, 0, from_tty); > +# trace the test code > +gdb_test_no_output "record btrace" > +gdb_test "next" Please add a pattern that makes sure the "next" actually finished successfully. > + > +# start replaying > +gdb_test "reverse-stepi" Likewise. > + > +# disassemble the code around the current PC > +gdb_test "disassemble \$pc, +10" [join [list \ > + ".*" \ > + "End of assembler dump\." \ > + ] "\r\n"] What is the error one gets without the fix? Doesn't GDB say "End of assembler dump" in that case too? -- Pedro Alves