From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99059 invoked by alias); 6 Mar 2016 16:35:11 -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 98882 invoked by uid 89); 6 Mar 2016 16:35:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=global2, displays, 1887, 1o X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 06 Mar 2016 16:35:07 +0000 Received: from hogfather.0x04.net (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by xyzzy.0x04.net (Postfix) with ESMTPS id 9CF9940651 for ; Sun, 6 Mar 2016 17:36:02 +0100 (CET) Received: by hogfather.0x04.net (Postfix, from userid 1000) id 6FA8A580094; Sun, 6 Mar 2016 17:35:00 +0100 (CET) From: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= To: gdb-patches@sourceware.org Cc: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= Subject: [PATCH 7/8] gdb.trace/entry-values.exp: Fixes for powerpc64. Date: Sun, 06 Mar 2016 16:35:00 -0000 Message-Id: <1457282097-7201-8-git-send-email-koriakin@0x04.net> In-Reply-To: <1457282097-7201-1-git-send-email-koriakin@0x04.net> References: <1457282097-7201-1-git-send-email-koriakin@0x04.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00104.txt.bz2 On powerpc64, "disassemble foo" doesn't work properly on object files (it can't process the relocations in .opd section) - instead, let's link it into an executable and load that. Also, backtrace displays .main, not main. Accept both. gdb/testsuite/ChangeLog: * gdb.trace/entry-values.exp: Link ${binfile}1.o to ${binfile}1 and use it for disassembly; accept .main in addition to main in backtrace. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.trace/entry-values.exp | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 54d0f01..c634ce8 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-03-06 Marcin Kościelnicki + + * gdb.trace/entry-values.exp: Link ${binfile}1.o to ${binfile}1 and + use it for disassembly; accept .main in addition to main in backtrace. + 2016-03-05 Wei-cheng Wang Marcin Kościelnicki diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp index 81b0263..e8ed517 100644 --- a/gdb/testsuite/gdb.trace/entry-values.exp +++ b/gdb/testsuite/gdb.trace/entry-values.exp @@ -26,14 +26,19 @@ if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \ return -1 } -# Start GDB and load object file, compute the offset of the +if {[gdb_compile [list ${binfile}1.o] \ + "${binfile}1" executable {}] != ""} { + return -1 +} + +# Start GDB and load executable file, compute the offset of the # instruction in bar returned from foo. It is needed in the Dwarf # Assembler. gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile}1.o +gdb_load ${binfile}1 set returned_from_foo "" @@ -183,7 +188,7 @@ gdb_test_no_output "set print entry-values both" gdb_test_sequence "bt" "bt (1)" { "\[\r\n\]#0 .* foo \\(i=[-]?[0-9]+, i@entry=2, j=[-]?[0-9]+, j@entry=3\\)" "\[\r\n\]#1 .* bar \\(i=, i@entry=\\)" - "\[\r\n\]#2 .* main \\(\\)" + "\[\r\n\]#2 .* \.?main \\(\\)" } # Update global variables 'global1' and 'global2' and test that the @@ -195,7 +200,7 @@ gdb_test_no_output "set var global2=11" gdb_test_sequence "bt" "bt (2)" { "\[\r\n\]#0 .* foo \\(i=[-]?[0-9]+, i@entry=10, j=[-]?[0-9]+, j@entry=11\\)" "\[\r\n\]#1 .* bar \\(i=, i@entry=\\)" - "\[\r\n\]#2 .* main \\(\\)" + "\[\r\n\]#2 .* \.?main \\(\\)" } # Restart GDB and trace. -- 2.7.2