From patchwork Fri Sep 23 14:17:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 57973 Return-Path: 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 B862A385734C for ; Fri, 23 Sep 2022 14:18:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B862A385734C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663942739; bh=zOBE1g8c5Fzt/6X675GvXHAyIdSlZ5sxYFl6syBrTHE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Skhd68d/pkStLqW5lsgz3uohQdCU2mjp83ypqG6VOBt++12Rb/Pnkk8GR4iy0ako+ 9zxKlQ0WteUSe2r6tW4vqQgAOrg4CHy5OH3LCjoQgwVj2+p4bqUPS5hNAp+skpNQPE Ux/5pMYcmPItAEXT13TKzv6f2eIp/sYA8cnVi5t0= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 813683857BA2 for ; Fri, 23 Sep 2022 14:18:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 813683857BA2 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 28NEI2ls001489 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 10:18:07 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 28NEI2ls001489 Received: from simark.localdomain (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D447A1E110; Fri, 23 Sep 2022 10:18:02 -0400 (EDT) To: gdb-patches@sourceware.org Subject: [PATCH 1/3] gdb/testsuite: bump duration for the whole test in do_self_tests Date: Fri, 23 Sep 2022 10:17:59 -0400 Message-Id: <20220923141801.1106678-2-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923141801.1106678-1-simon.marchi@polymtl.ca> References: <20220923141801.1106678-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 23 Sep 2022 14:18:02 +0000 X-Spam-Status: No, score=-3190.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" When running gdb.gdb/python-helper.exp, I get some timeouts: continue Continuing. print 1 FAIL: gdb.gdb/python-helper.exp: hit breakpoint in outer gdb (timeout) At this time, GDB is actually processing the stop and reading in some CUs. selftest_setup does bump the timeout, but it's not for the whole test. Since debugging GDB with GDB is (unfortunately) a bit slow, bump the timeout for the whole duration of the setup and body. On my optimized build, the command takes just a bit more than the current timeout of 10 seconds. But it's much slower if running the test on an unoptimized build, so I think it's necessary to bump the timeout for that in any case. Change-Id: I4d38285870e76c94f9d0bfdb60648a2e7f2cfa5d --- gdb/testsuite/lib/selftest-support.exp | 36 ++++++-------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp index 138afc0df568..2b17c539a96f 100644 --- a/gdb/testsuite/lib/selftest-support.exp +++ b/gdb/testsuite/lib/selftest-support.exp @@ -45,29 +45,14 @@ proc find_gdb { arg } { proc selftest_setup { executable function } { global gdb_prompt - global timeout global INTERNAL_GDBFLAGS # load yourself into the debugger - # This can take a relatively long time, particularly for testing where - # the executable is being accessed over a network, or where gdb does not - # support partial symbols for a particular target and has to load the - # entire symbol table. Set the timeout to 10 minutes, which should be - # adequate for most environments (it *has* timed out with 5 min on a - # SPARCstation SLC under moderate load, so this isn't unreasonable). - # After gdb is started, set the timeout to 30 seconds for the duration - # of this test, and then back to the original value. - - set oldtimeout $timeout - set timeout 600 - verbose "Timeout is now $timeout seconds" 2 global gdb_file_cmd_debug_info set gdb_file_cmd_debug_info "unset" set result [gdb_load $executable] - set timeout $oldtimeout - verbose "Timeout is now $timeout seconds" 2 if { $result != 0 } then { return -1 @@ -85,9 +70,6 @@ proc selftest_setup { executable function } { } # run yourself - # It may take a very long time for the inferior gdb to start (lynx), - # so we bump it back up for the duration of this command. - set timeout 600 set description "run until breakpoint at $function" gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" { @@ -99,21 +81,14 @@ proc selftest_setup { executable function } { } -re "vfork: No more processes.*$gdb_prompt $" { fail "$description (out of virtual memory)" - set timeout $oldtimeout - verbose "Timeout is now $timeout seconds" 2 return -1 } -re ".*$gdb_prompt $" { fail "$description" - set timeout $oldtimeout - verbose "Timeout is now $timeout seconds" 2 return -1 } } - set timeout $oldtimeout - verbose "Timeout is now $timeout seconds" 2 - return 0 } @@ -159,9 +134,14 @@ proc do_self_tests {function body} { gdb_start set file [remote_download host $GDB_FULLPATH $xgdb] - set result [selftest_setup $file $function] - if {$result == 0} then { - set result [uplevel $body] + # When debugging GDB with GDB, some operations can take a relatively long + # time, especially if the build is non-optimized. Bump the timeout for the + # duration of the test. + with_timeout_factor 10 { + set result [selftest_setup $file $function] + if {$result == 0} then { + set result [uplevel $body] + } } gdb_exit From patchwork Fri Sep 23 14:18:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 57974 Return-Path: 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 7320E3857000 for ; Fri, 23 Sep 2022 14:19:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7320E3857000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663942767; bh=4fDx2V0Nyxfh1yAiWB/9zDnTJHjGUYRIta+dRHLIAwc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=QOsnFDlptaW+wuXXFqZSeBWTB5OQx106TiHj2to6XMtWwxybz5ZHH23FdLTtA2271 KfZMU6kdDNf866G0phv5YVzR+HZ6nf0UUwiFvDJpUEUkyrAGCwAZe2H4SN4JNyiuJC /s9VmT3Fury3568dBwMXn/54h4KLP46OW4lRoD7o= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id A70243857BB7 for ; Fri, 23 Sep 2022 14:18:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A70243857BB7 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 28NEI3k1001492 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 10:18:07 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 28NEI3k1001492 Received: from simark.localdomain (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id EC6C01E112; Fri, 23 Sep 2022 10:18:02 -0400 (EDT) To: gdb-patches@sourceware.org Subject: [PATCH 2/3] gdb/testsuite: use gdb_test in gdb.gdb/python-helper.exp Date: Fri, 23 Sep 2022 10:18:00 -0400 Message-Id: <20220923141801.1106678-3-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923141801.1106678-1-simon.marchi@polymtl.ca> References: <20220923141801.1106678-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 23 Sep 2022 14:18:03 +0000 X-Spam-Status: No, score=-3190.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" If some command in there gives the wrong answer, we currently have to wait for a timeout for the test to continue. For instance, I currently see: print *val->type $1 = Python Exception : Cannot take address of method length. (outer-gdb) FAIL: gdb.gdb/python-helper.exp: pretty print type (timeout) We can avoid this and modernize the test at the same time by using the -prompt option of gdb_test. gdb_test_no_output currently accepts a -prompt_re option (the variable name passed to parse_args defines the option name), but I think it's a typo. It's supposed to be -prompt, like gdb_test. I can't find anything using -prompt_re using grep. Change it to just "prompt". Change-Id: Icc0a9a0ef482e62460c708bccdd544c11d711eca --- gdb/testsuite/gdb.gdb/python-helper.exp | 88 +++++-------------------- gdb/testsuite/lib/gdb.exp | 8 +-- 2 files changed, 21 insertions(+), 75 deletions(-) diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp index 6db8bf0df507..ea362ef693d9 100644 --- a/gdb/testsuite/gdb.gdb/python-helper.exp +++ b/gdb/testsuite/gdb.gdb/python-helper.exp @@ -82,13 +82,11 @@ proc test_python_helper {} { # binary into the inner GDB. gdb_test_no_output "disable breakpoints" + set outer_prompt_re "\\(outer-gdb\\) $" + # Adjust the prompt on the outer gdb, this just makes things a # little clearer when trying to unpick which GDB is active. - gdb_test_multiple "set prompt (outer-gdb) " "set outer gdb prompt" { - -re "\[(\]outer-gdb\[)\].*\[(\]outer-gdb\[)\] $" { - pass $gdb_test_name - } - } + gdb_test_no_output -prompt $outer_prompt_re "set prompt (outer-gdb) " "set outer gdb prompt" # Send a command to the outer GDB to continue the inner GDB. The # stop is being detected from the inner GDB, hence the use of -i @@ -113,18 +111,10 @@ proc test_python_helper {} { # Send Ctrl-C to the inner GDB, this should kick us back to the # prompt of the outer GDB. send_inferior "\003" - gdb_test_multiple "" "interrupted the inner" { - -re ".*\\(outer-gdb\\) $" { - pass $gdb_test_name - } - } + gdb_test -prompt $outer_prompt_re "" "" "interrupted the inner" # Now enable all breakpoints within the outer GDB. - gdb_test_multiple "enable breakpoints" "" { - -re "\\(outer-gdb\\) $" { - pass $gdb_test_name - } - } + gdb_test_no_output -prompt $outer_prompt_re "enable breakpoints" # We need to resume the inner GDB after interrupting it, this is # done by sending 'continue'. However, GDB will not redisplay the @@ -137,11 +127,7 @@ proc test_python_helper {} { # GDB, this should result in the outer GDB stopping at one of the # breakpoints we created.. send_inferior "print 1\n" - gdb_test_multiple "" "hit breakpoint in outer gdb" { - -re "Breakpoint $decimal, value_print.*\\(outer-gdb\\) $" { - pass $gdb_test_name - } - } + gdb_test -prompt $outer_prompt_re "" "Breakpoint $decimal, value_print.*" "hit breakpoint in outer gdb" # Now inspect the type of parameter VAL, this should trigger the # pretty printers. @@ -152,16 +138,8 @@ proc test_python_helper {} { " chain = 0x0," \ " instance_flags = 0," \ " length = $decimal," \ - " main_type = $hex}" \ - "\\(outer-gdb\\) $"] - gdb_test_multiple "print *val->type" "pretty print type" { - -re "$answer" { - pass $gdb_test_name - } - -re "There is no member named.*\r\n\\(outer-gdb\\) $" { - fail $gdb_test_name - } - } + " main_type = $hex}"] + gdb_test -prompt $outer_prompt_re "print *val->type" $answer "pretty print type" set answer [multi_line \ "$decimal = " \ @@ -170,16 +148,8 @@ proc test_python_helper {} { " flags = \[^\r\n\]+," \ " owner = $hex \\(gdbarch\\)," \ " target_type = 0x0," \ - " type_specific_field = TYPE_SPECIFIC_NONE}" \ - "\\(outer-gdb\\) $"] - gdb_test_multiple "print *val->type->main_type" "pretty print type->main_type" { - -re "$answer" { - pass $gdb_test_name - } - -re "There is no member named.*\r\n\\(outer-gdb\\) $" { - fail $gdb_test_name - } - } + " type_specific_field = TYPE_SPECIFIC_NONE}"] + gdb_test -prompt $outer_prompt_re "print *val->type->main_type" $answer "pretty print type->main_type" # Send the continue to the outer GDB, which resumes the inner GDB, # we then detect the prompt from the inner GDB, hence the use of @@ -195,12 +165,8 @@ proc test_python_helper {} { # information, this will include the TYPE_SPECIFIC_INT # information. send_inferior "print global_c.m_val\n" - gdb_test_multiple "" "print integer from DWARF info" { - -re "Breakpoint $decimal, value_print.*\\(outer-gdb\\) $" { - pass $gdb_test_name - } - } - + gdb_test -prompt $outer_prompt_re "" "Breakpoint $decimal, value_print.*" "print integer from DWARF info" + set answer [multi_line \ "$decimal = " \ "{name = $hex \"int\"," \ @@ -208,16 +174,8 @@ proc test_python_helper {} { " flags = \[^\r\n\]+," \ " owner = $hex \\(objfile\\)," \ " target_type = 0x0," \ - " int_stuff = { bit_size = $decimal, bit_offset = $decimal }}" \ - "\\(outer-gdb\\) $"] - gdb_test_multiple "print *val->type->main_type" "pretty print type->main_type for DWARF type" { - -re "$answer" { - pass $gdb_test_name - } - -re "There is no member named.*\r\n\\(outer-gdb\\) $" { - fail $gdb_test_name - } - } + " int_stuff = { bit_size = $decimal, bit_offset = $decimal }}"] + gdb_test -prompt $outer_prompt_re "print *val->type->main_type" $answer "pretty print type->main_type for DWARF type" # Send the continue to the outer GDB, which resumes the inner GDB, # we then detect the prompt from the inner GDB, hence the use of @@ -232,11 +190,7 @@ proc test_python_helper {} { # Send a command to the inner GDB, this should result in the outer # GDB stopping at the value_print breakpoint again. send_inferior "ptype global_c\n" - gdb_test_multiple "" "hit breakpoint in outer gdb again" { - -re "Breakpoint $decimal, c_print_type .*\\(outer-gdb\\) $" { - pass $gdb_test_name - } - } + gdb_test -prompt $outer_prompt_re "" "Breakpoint $decimal, c_print_type.*" "hit breakpoint in outer gdb again" set answer [multi_line \ "$decimal = " \ @@ -251,16 +205,8 @@ proc test_python_helper {} { " m_loc_kind = FIELD_LOC_KIND_BITPOS," \ " bitsize = 0," \ " bitpos = 0}," \ - " cplus_stuff = $hex}" \ - "\\(outer-gdb\\) $"] - gdb_test_multiple "print *type->main_type" "" { - -re "$answer" { - pass $gdb_test_name - } - -re "\r\n\\(outer-gdb\\) $" { - fail $gdb_test_name - } - } + " cplus_stuff = $hex}"] + gdb_test -prompt $outer_prompt_re "print *type->main_type" $answer return 0 } diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 68536b00f146..5ab4df1bcf3c 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1478,17 +1478,17 @@ proc gdb_test_no_output { args } { global gdb_prompt parse_args { - {prompt_re ""} + {prompt ""} {nopass} } lassign $args command message - set prompt_re [fill_in_default_prompt $prompt_re] + set prompt [fill_in_default_prompt $prompt] set command_regex [string_to_regexp $command] - gdb_test_multiple $command $message -prompt $prompt_re { - -re "^$command_regex\r\n$prompt_re" { + gdb_test_multiple $command $message -prompt $prompt { + -re "^$command_regex\r\n$prompt" { if {!$nopass} { pass $gdb_test_name } From patchwork Fri Sep 23 14:18:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 57972 Return-Path: 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 DCB763857427 for ; Fri, 23 Sep 2022 14:18:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCB763857427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663942719; bh=Rlo6yJ4ZR+2ljbqB6uC26+WaUdvsO96a/41zTOMEMEM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=E2tYu0wK8GEafR2v1mfQXWiRzppsTYw7bjlOveE0otzXh29AQ7EmBkPCG/xWqSI4n TNs4lsk1f6Kj/+aLFq7AgZT0dEhLbdzXfMXU1aTc/FBXrHVGhQuQv7D7V4y5pudeQK RnpMvzeZE92weAk+zWSiXp2DRQIH72J7WwC5lNi8= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id BBD763857824 for ; Fri, 23 Sep 2022 14:18:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BBD763857824 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 28NEI3EG001498 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Sep 2022 10:18:07 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 28NEI3EG001498 Received: from simark.localdomain (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0F5E71E11A; Fri, 23 Sep 2022 10:18:03 -0400 (EDT) To: gdb-patches@sourceware.org Subject: [PATCH 3/3] gdb/testsuite: update field names in gdb-gdb.py.in Date: Fri, 23 Sep 2022 10:18:01 -0400 Message-Id: <20220923141801.1106678-4-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923141801.1106678-1-simon.marchi@polymtl.ca> References: <20220923141801.1106678-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 23 Sep 2022 14:18:03 +0000 X-Spam-Status: No, score=-3190.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Patches that renamed the type::length and type::target_type fields didn't update gdb-gdb.py.in accordingly, do that. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29599 Change-Id: I0f3f37a94d43497789156b0ded4d2f2dd5b89496 --- gdb/gdb-gdb.py.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/gdb-gdb.py.in b/gdb/gdb-gdb.py.in index a6148d6dd67e..c43f54e202d3 100644 --- a/gdb/gdb-gdb.py.in +++ b/gdb/gdb-gdb.py.in @@ -115,7 +115,7 @@ class StructTypePrettyPrinter: fields.append( "instance_flags = %s" % TypeFlagsPrinter(self.val["m_instance_flags"]) ) - fields.append("length = %d" % self.val["length"]) + fields.append("length = %d" % self.val["m_length"]) fields.append("main_type = %s" % self.val["main_type"]) return "\n{" + ",\n ".join(fields) + "}" @@ -260,7 +260,7 @@ class StructMainTypePrettyPrinter: fields.append("code = %s" % self.val["code"]) fields.append("flags = [%s]" % self.flags_to_string()) fields.append("owner = %s" % self.owner_to_string()) - fields.append("target_type = %s" % self.val["target_type"]) + fields.append("target_type = %s" % self.val["m_target_type"]) if self.val["nfields"] > 0: for fieldno in range(self.val["nfields"]): fields.append(self.struct_field_img(fieldno))