From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 645E33858D28 for ; Mon, 7 Aug 2023 19:03:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 645E33858D28 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 (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 377InYbb016062; Mon, 7 Aug 2023 19:03:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=frnoOpmVUjc3It586oXBvCX9psdD54ozupvEAKXWQ38=; b=DDauVM39lyp4YrU64DtCANyke3gKnL9pqxUW29JHXx+qt0C+udtzUZntfbti/PbIPser UgDwTXzLQ+6uQfBcaXS68INhmJRhytxAhQ/LqeQIJOMbvNq0aACjLlB1omG2gQ0JDIa0 Rv9QghM/FySqTaVLVPe0rKpljR8Q6nNF85FwI6l4Y1ernDUq8dIJA1LcEz21a33lIA4v kWSa07XXwbZ/nA5pJPw9JRQHksRRwF1lQqZ+ZwJwysa8l/e0+w09OFE5rTovCkyXx5YJ 7ZexkKsAHiD0/GE0VzPEWzJNbHOQudhgYSE61Zo3Q55IGRrE5PS0PJ/Yx+vpE+P2xQcy 9g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sb67r8b93-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Aug 2023 19:03:27 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 377Inrcb016689; Mon, 7 Aug 2023 19:03:26 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sb67r8b8q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Aug 2023 19:03:26 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 377IMR03001801; Mon, 7 Aug 2023 19:03:25 GMT Received: from smtprelay02.dal12v.mail.ibm.com ([172.16.1.4]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3sa3f1f8pq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Aug 2023 19:03:25 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay02.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 377J3PN732440762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Aug 2023 19:03:25 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E7BB58059; Mon, 7 Aug 2023 19:03:25 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A600C58055; Mon, 7 Aug 2023 19:03:24 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.61.185.149]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 7 Aug 2023 19:03:24 +0000 (GMT) Message-ID: Subject: [PATCH 1/2 ver 2] Fix reverse stepping multiple contiguous PC ranges over the line table. 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: Mon, 07 Aug 2023 12:03:24 -0700 In-Reply-To: <3a46ac42391707325ee2aab900d13bce05c8a0b8.camel@us.ibm.com> References: <3a46ac42391707325ee2aab900d13bce05c8a0b8.camel@us.ibm.com> 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: Gt7FatAtGmsageWLYNInyGYgf4ZBtYt0 X-Proofpoint-GUID: zFFpq9ZBtpxW_6qPiU-2ocJp5cTyQzCv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-07_20,2023-08-03_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 adultscore=0 malwarescore=0 spamscore=0 mlxlogscore=957 mlxscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308070170 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 List-Id: Simon, GDB maintainers: Version 2, updated the compiler check and handling for gcc version 6 and earlier. Retested on Power 10. Per the comments on version 4 for the gdb.reverse/func-map-to-same- line.exp, I have added support to proc gdb_compile to enable or disable generating line information as part of the debug information. The two new options are column-info and no-column-info. This patch implements the new options for gdb_compile. These options have been tested with patch 2 of 2 on PowerPC with the GCC and clang compilers. Please let me know if the patch is acceptable for mainline. Thanks. Carl -------------------------- Add gdb_compile options column-info and no-column-info This patch adds two new options to gdb_compile to specify if the compile should or should not generate the line table information. The options are supported on clang and gcc version 7 and newer. Patch has been tested on PowerPC with both gcc and clang. --- gdb/testsuite/lib/gdb.exp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 36bf738c667..bffbbf38b09 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4896,6 +4896,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: @@ -5105,6 +5107,38 @@ proc gdb_compile {source dest type options} { } else { error "Don't know how to handle text_segment option." } + } elseif { $opt == "column-info" } { + # If GCC or clang does not support column-info, compilation + # will fail and the usupported column-info option will be + # reported as such. + if {[test_compiler_info {gcc-*}]} { + lappend new_options "additional_flags=-gcolumn-info" + + } elseif {[test_compiler_info {clang-*}]} { + lappend new_options "additional_flags=-gcolumn-info" + + } else { + error "Don't know how to handle gcolumn-info option." + } + + } elseif { $opt == "no-column-info" } { + if {[test_compiler_info {gcc-*}]} { + if {[test_compiler_info {gcc-[1-6]-*}]} { + # 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." + } else { + lappend new_options "additional_flags=-gno-column-info" + } + + } elseif {[test_compiler_info {clang-*}]} { + lappend new_options "additional_flags=-gno-column-info" + + } else { + error "Don't know how to handle gno-column-info option." + } + } else { lappend new_options $opt } -- 2.37.2