Message ID | 20240829144236.9530-1-tdevries@suse.de |
---|---|
State | Committed |
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5BF9E386102B for <patchwork@sourceware.org>; Thu, 29 Aug 2024 14:41:53 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 9CC81385C6D1 for <gdb-patches@sourceware.org>; Thu, 29 Aug 2024 14:41:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9CC81385C6D1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9CC81385C6D1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724942489; cv=none; b=RZURDjlLw2Qp7wB7unpEXUIGT1u9oNcPdNoZh0Mx3uJqxrMw4A8BculqJfpXGCOAiFhMfdJky5fiMo6Rjka3USMHMSkGrXttmyndQ1XiZDMWVoLRw7kcuhMB300eNp0Ao5/NTkyl7Ro2FecaxrqJd8ERaseG4jdBadbmoS+tSF4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724942489; c=relaxed/simple; bh=aq87LDb1ObsbZzwRZmT39jNHyyiqpDENd1McXgAt3F8=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=R9qndD3DlZ1QigRSORR9xEibcKsAnsZmX0wdDeg6XSTQFYOwlwvgB3JmurFAdGiK74TLsTzpJJWFQyaUpBjbGrxxBtRiaao2P42GMJ9MYwde7y0KGwTSw5W63CTfPpYUBH4he/TWKuHOKIsyJgLG1cZxd+OWik98vgr3DlLP4KY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 786241F394 for <gdb-patches@sourceware.org>; Thu, 29 Aug 2024 14:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724942486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PU1Al9WeJME+u3z9LYUOzDEv69dsVOkmftX31RUr0S0=; b=k1q8DnHD75ONtwQTuvlrJs6ZDBx2+W9hZYBGNwLLqb35Xas4Rw56jQbyf7wNSa2L9z5+hW kI5TCqaIL/uJ0dl647zeph4E8LaIXIqyZOEzJHFea6EKopLkoDOVY24hhTgIKE2h2bd16r owqAIkohimKjc2G0Nsf+liGGLDkwrZM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724942486; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PU1Al9WeJME+u3z9LYUOzDEv69dsVOkmftX31RUr0S0=; b=ZHTZzSwTgGmrQJ3zkRzhLjnnbGhBATzvRWRDYMIpSVABpkMFwFHn3ARRAJ5zWycg7+f8vi DYAegPRyhF45SGCw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="a6r3x/zj"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=QwWYT5S6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724942485; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PU1Al9WeJME+u3z9LYUOzDEv69dsVOkmftX31RUr0S0=; b=a6r3x/zj5IHSbaA39HgW+KIMCX6L1PvvlVkCz6KE8sk0KKh2YJ26gRD9nNMb20MFC6bf1k Jp/W2+HOxodZkF77qzTkSMIbnlwpgzjfJHDXmsYqNjFFMxzdcDW2FUpTuiUaBp/T2nNLVr UuZ+ZROR3R67VNTjwJlBljMI9ENeymM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724942485; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PU1Al9WeJME+u3z9LYUOzDEv69dsVOkmftX31RUr0S0=; b=QwWYT5S6Y0kcXfFWLHvSV6y4poODHQpXUg0pyeIhQPcP/PxOs0LuVD522WQGjW88e8lJon B6NulMtOdYunvqCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 62E47139B0 for <gdb-patches@sourceware.org>; Thu, 29 Aug 2024 14:41:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ciDRFpWI0GbBWQAAD6G6ig (envelope-from <tdevries@suse.de>) for <gdb-patches@sourceware.org>; Thu, 29 Aug 2024 14:41:25 +0000 From: Tom de Vries <tdevries@suse.de> To: gdb-patches@sourceware.org Subject: [PATCH] [gdb/testsuite] Fix gdb.trace/entry-values.exp on riscv64-linux Date: Thu, 29 Aug 2024 16:42:36 +0200 Message-Id: <20240829144236.9530-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 786241F394 X-Spam-Level: X-Spamd-Result: default: False [-5.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; TO_DN_NONE(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns, suse.de:dkim, suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -5.01 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
[gdb/testsuite] Fix gdb.trace/entry-values.exp on riscv64-linux
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_gdb_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 | success | Test passed |
Commit Message
Tom de Vries
Aug. 29, 2024, 2:42 p.m. UTC
On riscv64-linux, with test-case gdb.trace/entry-values.exp I run into: ... (gdb) disassemble bar^M Dump of assembler code for function bar:^M 0x0000000000000646 <+0>: addi sp,sp,-48^M 0x0000000000000648 <+2>: sd ra,40(sp)^M 0x000000000000064a <+4>: sd s0,32(sp)^M 0x000000000000064c <+6>: addi s0,sp,48^M 0x000000000000064e <+8>: mv a5,a0^M 0x0000000000000650 <+10>: sw a5,-36(s0)^M 0x0000000000000654 <+14>: li a5,2^M 0x0000000000000656 <+16>: sw a5,-20(s0)^M 0x000000000000065a <+20>: lw a4,-20(s0)^M 0x000000000000065e <+24>: lw a5,-36(s0)^M 0x0000000000000662 <+28>: mv a1,a4^M 0x0000000000000664 <+30>: mv a0,a5^M 0x0000000000000666 <+32>: jal 0x628 <foo>^M 0x000000000000066a <+36>: mv a5,a0^M 0x000000000000066c <+38>: mv a0,a5^M 0x000000000000066e <+40>: ld ra,40(sp)^M 0x0000000000000670 <+42>: ld s0,32(sp)^M 0x0000000000000672 <+44>: addi sp,sp,48^M 0x0000000000000674 <+46>: ret^M End of assembler dump.^M (gdb) FAIL: gdb.trace/entry-values.exp: disassemble bar FAIL: gdb.trace/entry-values.exp: find the call or branch instruction offset in bar ... Fix this by setting call_insn to jal for riscv64. Tested on riscv64-linux and x86_64-linux. --- gdb/testsuite/gdb.trace/entry-values.exp | 2 ++ 1 file changed, 2 insertions(+) base-commit: f2a15e7cde98af543a016090e4063180851a6d09
Comments
On 8/29/24 16:42, Tom de Vries wrote: > On riscv64-linux, with test-case gdb.trace/entry-values.exp I run into: > ... > (gdb) disassemble bar^M > Dump of assembler code for function bar:^M > 0x0000000000000646 <+0>: addi sp,sp,-48^M > 0x0000000000000648 <+2>: sd ra,40(sp)^M > 0x000000000000064a <+4>: sd s0,32(sp)^M > 0x000000000000064c <+6>: addi s0,sp,48^M > 0x000000000000064e <+8>: mv a5,a0^M > 0x0000000000000650 <+10>: sw a5,-36(s0)^M > 0x0000000000000654 <+14>: li a5,2^M > 0x0000000000000656 <+16>: sw a5,-20(s0)^M > 0x000000000000065a <+20>: lw a4,-20(s0)^M > 0x000000000000065e <+24>: lw a5,-36(s0)^M > 0x0000000000000662 <+28>: mv a1,a4^M > 0x0000000000000664 <+30>: mv a0,a5^M > 0x0000000000000666 <+32>: jal 0x628 <foo>^M > 0x000000000000066a <+36>: mv a5,a0^M > 0x000000000000066c <+38>: mv a0,a5^M > 0x000000000000066e <+40>: ld ra,40(sp)^M > 0x0000000000000670 <+42>: ld s0,32(sp)^M > 0x0000000000000672 <+44>: addi sp,sp,48^M > 0x0000000000000674 <+46>: ret^M > End of assembler dump.^M > (gdb) FAIL: gdb.trace/entry-values.exp: disassemble bar > FAIL: gdb.trace/entry-values.exp: find the call or branch instruction offset in bar > ... > > Fix this by setting call_insn to jal for riscv64. > Pushed. Thanks, - Tom > Tested on riscv64-linux and x86_64-linux. > --- > gdb/testsuite/gdb.trace/entry-values.exp | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp > index 3b358cc95cc..82ae5a8b273 100644 > --- a/gdb/testsuite/gdb.trace/entry-values.exp > +++ b/gdb/testsuite/gdb.trace/entry-values.exp > @@ -53,6 +53,8 @@ if { [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] } { > # returns. The only exception is JALRC, in which case execution > # resumes from `insn1' instead. > set call_insn {jalrc|[jb]al[sxr]*[ \t][^\r\n]+\r\n} > +} elseif { [istarget "riscv64*-*-*"] } { > + set call_insn jal > } else { > set call_insn "call" > } > > base-commit: f2a15e7cde98af543a016090e4063180851a6d09
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp index 3b358cc95cc..82ae5a8b273 100644 --- a/gdb/testsuite/gdb.trace/entry-values.exp +++ b/gdb/testsuite/gdb.trace/entry-values.exp @@ -53,6 +53,8 @@ if { [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] } { # returns. The only exception is JALRC, in which case execution # resumes from `insn1' instead. set call_insn {jalrc|[jb]al[sxr]*[ \t][^\r\n]+\r\n} +} elseif { [istarget "riscv64*-*-*"] } { + set call_insn jal } else { set call_insn "call" }