From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by sourceware.org (Postfix) with ESMTPS id E00B4385DC0A for ; Tue, 16 Jun 2020 20:47:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E00B4385DC0A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x442.google.com with SMTP id c3so26760wru.12 for ; Tue, 16 Jun 2020 13:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uSV5C8GCmnMaDo2Jyie91fXgxtbEi8JLRGnMPx6xMLQ=; b=FYNNNkIbn6/aJZwPSvCqQYaSoYYci/pwxqaCrYdXP2P7oh9QuSQGI+dIJp/JrDcvpw p3G+xL+iWAc6yn+5Ph+ViEqqDDZbXHRQZGimCSpKzKZqd1w0oddHBBmT0aQPhOR7AxMS mTIdS6ByXZFUn7CpEaYFvcbdMjZnxzGKBDa05DwVHqtLclFEKrR0/atpY7QvH2DoiMcb CxFih3XlxdTWr/gagwU/ob/aqhiXX5zBXC+4lxfhOrf7ZMPVN4anJU6mrZQdB4HSOIxl tj3ct+qGY7Ojq0a4OG4qKH9YIG3ccmD90YNOgi73uchhbcfb17HhNdU9wgSSxyowIvwh o5xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uSV5C8GCmnMaDo2Jyie91fXgxtbEi8JLRGnMPx6xMLQ=; b=EmwDiqkqVraLJ7OQb4IHnDNBmzN1sOwG+RhDTGN4QsX1iTUyi5fhHuU+DJuluCJrx8 PsNIa32CjbbFVbtklrB0jQr8IaAh2Ns5fzdNzT08aJKmNjbxHFf+v1YDipq/ti7kr/Mh 9doGH9HnfpvmyrPqmQWQRzV8eUxCPcUKpLLDqB7UUQRsYuODOagW2k1831UwCytpS4cL LLcqrUn7CoGm5CnKj+ip2QnViuUL9Hajqek+XdokDzZEsk4xa7+IfNw1Pfl1WkHAqm5l 8PIcAdOBdq773/XmTLE8capnRrdQGcrn3EgPhJdkaSI5btrio805H31qYBriJnmMl6oD IciQ== X-Gm-Message-State: AOAM53286EssOiMpRqeTtTXOcWoNVt5g+iYtS6j5tslVG/BQJv5wLvTD tae2eIbAQEENeJbxeu/ofbdNQSqD5Zw= X-Google-Smtp-Source: ABdhPJwq7jo3s7p0LUDtyWTyDb9lSrwGaWE46DnT97z+ETqbKIi7uEC0YGYOGoCd3nxitsFs9dG1FQ== X-Received: by 2002:adf:bb02:: with SMTP id r2mr5127503wrg.143.1592340422924; Tue, 16 Jun 2020 13:47:02 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id g187sm5957335wma.17.2020.06.16.13.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 13:47:02 -0700 (PDT) Date: Tue, 16 Jun 2020 21:47:01 +0100 From: Andrew Burgess To: Sandra Loosemore Cc: "gdb-patches@sourceware.org" Subject: Re: [patch] gdb/testsuite: fixes for gdb.xml/tdesc-regs.exp Message-ID: <20200616204701.GT2737@embecosm.com> References: <71c00a14-a956-a087-8b9a-9b453194d4f2@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <71c00a14-a956-a087-8b9a-9b453194d4f2@codesourcery.com> X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 21:44:04 up 8 days, 10:51, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 20:47:05 -0000 * Sandra Loosemore [2020-06-16 14:04:51 -0600]: > We've had this patch to fix various failures in gdb.xml/tdesc-regs.exp in > our local tree for a few years now and would like to get it committed > upstream. It fixes these problems: > > - It's using the wrong source pathname when trying to copy the .xml file to > remote host. > > - We've seen at least one case where the type of the 32-bit register prints > as "int32_t" rather than "int|long" etc -- I think this was on an ilp64 > target. > > - This test expects to see a register group named "general" but not all > targets provide one. I'd be interested to know more about which targets don't place any registers in the 'general' group. This group is used in default_print_registers_info to implement 'info registers', so I'd like to see what this particular target has done instead. Thanks, Andrew > > OK to commit? > > -Sandra > commit d32235b2037694e2586f83b6c3a5bc76fd1241ab > Author: Sandra Loosemore > Date: Tue Jun 16 12:48:42 2020 -0700 > > gdb/testsuite: fixes for gdb.xml/tdesc-regs.exp > > 2020-06-16 Sandra Loosemore > Hafiz Abid Qadeer > > gdb/testsuite/ > * gdb.xml/tdesc-regs.exp (load_description): Correct pathname of > file sent to remote host. > (top level): Allow int32_t as type of 32-bit register. Don't > require a register group named "general". > > diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog > index d2ed9db..4b8c7b5 100644 > --- a/gdb/testsuite/ChangeLog > +++ b/gdb/testsuite/ChangeLog > @@ -1,3 +1,11 @@ > +2020-06-16 Sandra Loosemore > + Hafiz Abid Qadeer > + > + * gdb.xml/tdesc-regs.exp (load_description): Correct pathname of > + file sent to remote host. > + (top level): Allow int32_t as type of 32-bit register. Don't > + require a register group named "general". > + > 2020-06-16 Gary Benson > > * gdb.python/py-nested-maps.c (create_map): Add missing return > diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp > index bb04420..b1e4525 100644 > --- a/gdb/testsuite/gdb.xml/tdesc-regs.exp > +++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp > @@ -145,7 +145,7 @@ proc load_description { file errmsg xml_file } { > close $ofd > > if {[is_remote host]} { > - set regs_file [remote_download host "$subdir/$xml_file" $xml_file] > + set regs_file [remote_download host "$regs_file" $xml_file] > } > > # Anchor the test output, so that error messages are detected. > @@ -165,7 +165,7 @@ if {![is_remote host]} { > } > > load_description "extra-regs.xml" "" "test-extra-regs.xml" > -gdb_test "ptype \$extrareg" "type = (int|long|long long)" > +gdb_test "ptype \$extrareg" "type = (int32_t|int|long|long long)" > gdb_test "ptype \$uintreg" "type = uint32_t" > gdb_test "ptype \$vecreg" "type = int8_t __attribute__ \\(\\(vector_size\\(4\\)\\)\\)" > gdb_test "ptype \$unionreg" \ > @@ -180,9 +180,9 @@ gdb_test "ptype \$flags" \ > "type = flag flags {\r\n *bool X @0;\r\n *uint32_t Y @2;\r\n}" > gdb_test "ptype \$mixed_flags" \ > "type = flag mixed_flags {\r\n *bool A @0;\r\n *uint32_t B @1-3;\r\n *bool C @4;\r\n *uint32_t D @5;\r\n *uint32_t @6-7;\r\n *enum Z_values {yes = 1, no = 0, maybe = 2, so} Z @8-9;\r\n}" > -# Reggroups should have at least general and the extra foo group > +# Reggroups should have at least the extra foo group > gdb_test "maintenance print reggroups" \ > - " Group\[ \t\]+Type\[ \t\]+\r\n.* general\[ \t\]+user\[ \t\]+\r\n.* foo\[ \t\]+user\[ \t\]+" > + " Group\[ \t\]+Type\[ \t\]+\r\n.* foo\[ \t\]+user\[ \t\]+" > > with_test_prefix "core-only.xml" { > load_description "core-only.xml" "" "test-regs.xml"