From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id E959B3858C2F for ; Fri, 23 Jun 2023 19:41:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E959B3858C2F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=us.ibm.com Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35NJA3Dd001079; Fri, 23 Jun 2023 19:41:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding : subject; s=pp1; bh=YFtKdLC44EW7gTHQKegQ9HYpjQ/h8ImaOceE98Iux5I=; b=YY7cRRCvtfBpep5vsDRABDmDP/ZaaMchWGJZJSvDVAFjP5N31ddw8P+yVdabf6Gsdgz6 88VVpHPBTZEKM6MUK7opkJAfmezouEVo7JIR06E7w0KyLL+iAfbACFhMeqoLgBaypMtC ZzP1lyh4FM7Fub2dUxT6eSHnw36wd+2UwUY3WJSi9Jr0XKngGSp3SZPp/Vl5jL7Wzxj3 8/LJfMwp0hoRDFbw+GXwYiPxlCLrOfZLpu49sGZ8Mc+/ROV7fbhY7GRqKgajrCFpB2fP nJotFlf1/Gkx7kQG/Dru9hLt4rIP43bBoddGtCYYJecM93VyGqxuNlD3TsK8xFV7apE/ 6A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rdh1xgwt0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Jun 2023 19:41:43 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 35NJZihn023145; Fri, 23 Jun 2023 19:41:42 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rdh1xgwrt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Jun 2023 19:41:42 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 35NFvu8g001326; Fri, 23 Jun 2023 19:41:41 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([9.208.130.99]) by ppma05wdc.us.ibm.com (PPS) with ESMTPS id 3r94f6gg61-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Jun 2023 19:41:41 +0000 Received: from smtpav04.dal12v.mail.ibm.com (smtpav04.dal12v.mail.ibm.com [10.241.53.103]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 35NJfelG37159582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Jun 2023 19:41:40 GMT Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3FB695805A; Fri, 23 Jun 2023 19:41:40 +0000 (GMT) Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A764D58056; Fri, 23 Jun 2023 19:41:39 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.61.18.149]) by smtpav04.dal12v.mail.ibm.com (Postfix) with ESMTP; Fri, 23 Jun 2023 19:41:39 +0000 (GMT) Message-ID: <2aed325524d9fdc7e5853f33b00da2ebbf7a27f1.camel@us.ibm.com> From: Carl Love To: Simon Marchi , Bruno Larsen , gdb-patches@sourceware.org, UlrichWeigand , pedro@palves.net Cc: luis.machado@arm.com, cel@us.ibm.com Date: Fri, 23 Jun 2023 12:41:39 -0700 In-Reply-To: <4ab1e3ff-eede-5573-f58f-63ff8b1e23bb@simark.ca> References: <74630f1ccb6e9258ae60682105ee5490726fb255.camel@us.ibm.com> <46d73c69-9168-44c6-b515-23dd893fc0eb@redhat.com> <86c65f2ad74caffc162f100e4e9c5be9062a7f59.camel@us.ibm.com> <0a2c4ebd-f01d-4b96-1b13-25d7276056a5@redhat.com> <956b8c3c9a7bdc3aa6f9a040619ec4778edc9c94.camel@us.ibm.com> <89b2fb027024f7e97de7196ee091a0ca11c0c2b3.camel@us.ibm.com> <0943e12c-049d-f8b0-c4c5-8816b1be1e45@simark.ca> <961a88a7-a820-fd32-c7ee-e707697e22a5@simark.ca> <60ba16fb9207f7e6313265aa0a118f65787b52f7.camel@us.ibm.com> <95df539fed378baea3dd679bb10d33c57260f318.camel@us.ibm.com> <4ab1e3ff-eede-5573-f58f-63ff8b1e23bb@simark.ca> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GV6TI4ggofPKvKIgCn6pGLoSgCeoClSg X-Proofpoint-GUID: PQHP_bSU5oKE26Y4FCLIu_ARjNBSI2Ba Subject: RE: [PATCH 1/2] Fix reverse stepping multiple contiguous PC ranges over the line table. X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-23_11,2023-06-22_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 suspectscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 phishscore=0 mlxlogscore=999 adultscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306230175 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 List-Id: On Fri, 2023-06-23 at 13:44 -0400, Simon Marchi wrote: > > On 6/22/23 12:52, Carl Love wrote: > > Simon: > > > > On Mon, 2023-06-19 at 13:11 -0400, Simon Marchi wrote: > > > > --- a/gdb/testsuite/lib/gdb.exp > > > > +++ b/gdb/testsuite/lib/gdb.exp > > > > @@ -4794,6 +4794,8 @@ proc quote_for_host { args } { > > > > # debug information > > > > # - text_segment=addr: Tell the linker to place the text > > > > segment at ADDR. > > > > # - build-id: Ensure the final binary includes a build-id. > > > > +# - no-column-info: Disable generation of column table > > > > information. > > > > +# - column-info: Enable generation of column table > > > > information. > > > > # > > > > # And here are some of the not too obscure options understood > > > > by > > > > DejaGnu that > > > > # influence the compilation: > > > > @@ -5003,6 +5005,34 @@ proc gdb_compile {source dest type > > > > options} > > > > { > > > > } else { > > > > error "Don't know how to handle text_segment > > > > option." > > > > } > > > > + } elseif { $opt == "column-info" } { > > > > + if {[test_compiler_info {gcc-*}]} { > > > > + if {[test_compiler_info {gcc-[1-6]-*}]} { > > > > + error "gdb_compile option no-column-info not > > > > supported." > > > > > > I think this path should return the equivalent of "failed to > > > compile", > > > instead of throwing an error. Control will go back to the test, > > > which > > > will generally skip the portion of the test that requires that > > > binary. > > > > Not entirely sure how to accomplish what you are looking for. > > > > I change: > > error "gdb_compile option no-column-info not supported." > > to > > set result "option no-column-info not supported." > > clone_output "gdb compile failed, $result" > > return 1 > > > > When I force the if {[test_compiler_info...]} tp be true to test > > this, > > I get: > > > > get_compiler_info: gcc-12-2-1 > > gdb compile failed, option no-column-info not supported. > > UNTESTED: gdb.reverse/func-map-to-same-line.exp: > > with_column_info=yes: failed t\ > > o prepare > > testcase /home/carll/GDB/build-reverse-multiple- > > contiguous/gdb/testsuite/../../\ > > ../binutils-gdb-reverse-multiple- > > contiguous/gdb/testsuite/gdb.reverse/func-map-\ > > to-same-line.exp completed in 0 seconds > > > > === gdb Summary === > > > > # of untested testcases 1 > > > > The test case doesn't have any part of the test that doesn't > > require > > compiling so it is not clear if that would work with this > > fix. Anyway, > > wanted to run that by you to see if this is an appropriate fix? I > > am > > really not sure about it. Thanks. > > I think that's the expected behavior. The UNTESTED is emitted by > build_executable_from_specs, I think. If the test used gdb_compile, > I > think we wouldn't see an UNTESTED. But as far as your addition is > concerned, I think it's fine. > > I just thought of a simpler alternative though. Just remove the > version > check. If we build with an older gcc, there will simply be a message > that says that the flag is not recognized, and the result should be > just > the same. I just hacked it locally and changed the flag name to be > wrong (I don't have a gcc <= 6 on hand to test). It looks like: Yea, hacking the if {[test_compiler_info {gcc-[...]} is how I have been testing it as well. :-) > > Executing on host: gcc -fno-stack-protector -fdiagnostics- > color=never -gcolumn-info-foo -c -g -o /home/simark/build/binutils- > gdb/gdb/testsuite/outputs/gdb.reverse/func-map-to-same-line/func-map- > to-same-line0.o /home/simark/src/binutils- > gdb/gdb/testsuite/gdb.reverse/func-map-to-same-line.c (timeout = > 300) > builtin_spawn -ignore SIGHUP gcc -fno-stack-protector > -fdiagnostics-color=never -gcolumn-info-foo -c -g -o > /home/simark/build/binutils- > gdb/gdb/testsuite/outputs/gdb.reverse/func-map-to-same-line/func-map- > to-same-line0.o /home/simark/src/binutils- > gdb/gdb/testsuite/gdb.reverse/func-map-to-same-line.c > > gcc: error: unrecognized debug output level 'column-info-foo' > > compiler exited with status 1 > output is: > gcc: error: unrecognized debug output level 'column-info-foo' > > > gdb compile failed, gcc: error: unrecognized debug output level > 'column-info-foo' > UNTESTED: gdb.reverse/func-map-to-same-line.exp: > with_column_info=yes: failed to prepare Yes, that seems to give us the desired result. > > I then thought about the "no-column-info" case. Currently, you error > out for gccs <= 6. However, shouldn't we just compile without any > special flag in that case, since there just wasn't any support for > column-info back then? OK, but seems like we should also warn the user that the option is not supported and we are ignoring it. I put # In this case, don't add the compile line option and # the result will be the same as using no-column-info # on a version that supports the option. warning "gdb_compile option no-column-info not supported, ignoring." in for this case. Carl