Message ID | 20240629063035.93844-4-indu.bhagat@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <binutils-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 D0BEC381776B for <patchwork@sourceware.org>; Sat, 29 Jun 2024 06:31:31 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id F1E963831391 for <binutils@sourceware.org>; Sat, 29 Jun 2024 06:30:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1E963831391 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F1E963831391 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719642661; cv=pass; b=WTI4OMowzLIZymUhnOBXOzUSae5EeGj33uFvVzUQCJ7lH45QZ1BUklu2tYajeiM8WwW7aLu325Zw/6LaCPfW1pfv7nP6fnwJb4Lg21VgOyrW6L5umonqsBK+jTF0tbHTnq7jpssbpAqTDTBx3myBDmiFkRdApgxLwvVUttD6Uwo= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719642661; c=relaxed/simple; bh=/SMUfV29TsQbztPVyxy28SafziSTq0mH6RXc6p2xCVE=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=kU22u+bUnxgikTnsefTS9gRzbOGUN2RV/1Xa9SFd6vXVvHbQz5d5ypt2L59E33yGX6FH5hrsf3ymfXUChkooJiyYBcwoST+gs4ru7Sat0KW2KBdaxArMWsKB06xTaGabAk5ZMuv1i849OrfWAelQO68ga3h6VeI96g6sCDSx3Pk= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45T2vfCF021031; Sat, 29 Jun 2024 06:30:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=MhQX25ZKQ9dEPnbRqK1oK0jCXzKOmMK0zq7a571VHRo=; b= F47FKNxIIdJvhVAeC3sX2Wx+5K07bC48KmN10SSbsf/d+Vsp9nxCAP4zsbQl6C8t VuDqgb//AOCJzgsrqxq6NHOK4nFltOH53QjRiWN2R7nTgunmqcKxSNokirqcM3Ju bId23BSAaHvUlb4x8FTWMb/pnQiV/mNtlzVSGInvMiUW7btcxmWD3ZIi+fTTAaDM bJbFZuAdiifufHtKb9XRAZFS6+DbdchyQkvabHQOHctxWHT+sevTeOAH9nN6wZc0 8f3SGweiwCuU+elqrQOC5kG9ozlUk5HLLtGW8AQpgDeNuMrMoAV6ZpEm4mWu1U+/ hmEY2AZvlHGJLKVCv8grjQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4029vsg3wm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 29 Jun 2024 06:30:56 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 45T61O5w017083; Sat, 29 Jun 2024 06:30:56 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4028qb4858-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 29 Jun 2024 06:30:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H/YUJbFD3csHneMh0VcCOcAEqCLOvx0jUVd7eh7+Bn7C6DMDOxEmaNjhLKKQBcKsb9FAzqFg68FjxBemYjr5njvuIIClcX+cvvwfxcu0kOyrLL11jXeXs4thPgnqcJQZgrDbRs8/h481R8MoOCioXX75GimZuodtcvRZHK3NjyIeSYraMjpgq0uBu0J/E+2I1zoWKmg2V2vUdmraGzs8g4drgkvl7Ec6448NCuig+9vW/6QOp4MdHeT4KIX4cwNme8wHLvzCJRfKS8IZoBRyssKvkALw8b7oXU4oIgrsuuq8zNyyqjKyZaxxVlGyJ7hViDHgKaiM24nhco9FtfUXaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MhQX25ZKQ9dEPnbRqK1oK0jCXzKOmMK0zq7a571VHRo=; b=RwAxyofuKGTF0YHIi8tMB3HJdR7Se0+uNzRgez/byTdFW9o+P1VYntHvADX+cpCdXT1dGWGxIMwyVG3zi01atUnBK0ytKM07n+BZ6OarVxbszAd2nvbok0eo82WSXsqX4LLlXHVKxjz7xmmT6q8jucxzYlkJC+d7Wh0mRTWE1Ly44fH8NMF47rxgDMiLLcPf6UQ99uZeWm/ZpRPOdilTo46nk3fvRw7tDTntDmYdIFgCTDJw5GdZpo34KII6xvs1E5dSv0fmNtbU7uOXdcXgDQTLVlo96ceLPQJlcMQAxYW3mssyZqkvL4WQDYXq1HmujbEE1NWuSVulFuKC3SZtNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MhQX25ZKQ9dEPnbRqK1oK0jCXzKOmMK0zq7a571VHRo=; b=BCFJZ1HPkAJw0O8SB+4oaDlkj1VFwBCW+YC2gWxeSHO8md+yVCb3A6Kj/HyDpyhTpBMsBHFsf9hc8h93z3OxlUoDU9ez5S/dA3M8bUbzmh0l142rbC2S9tA//cbJfNOS1+JQNol1EhBAf7EWG0LzF3M1CH6SbW1ki5VBZIftZGk= Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by LV3PR10MB8081.namprd10.prod.outlook.com (2603:10b6:408:286::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.35; Sat, 29 Jun 2024 06:30:53 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::3902:e766:f2d3:a40a]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::3902:e766:f2d3:a40a%6]) with mapi id 15.20.7719.022; Sat, 29 Jun 2024 06:30:53 +0000 From: Indu Bhagat <indu.bhagat@oracle.com> To: binutils@sourceware.org Cc: jremus@linux.ibm.com, Indu Bhagat <indu.bhagat@oracle.com> Subject: [PATCH,V2 3/3] doc: sframe: add appendix for generating stack traces Date: Fri, 28 Jun 2024 23:30:35 -0700 Message-ID: <20240629063035.93844-4-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240629063035.93844-1-indu.bhagat@oracle.com> References: <20240629063035.93844-1-indu.bhagat@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR04CA0086.namprd04.prod.outlook.com (2603:10b6:303:6b::31) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|LV3PR10MB8081:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e8f0007-911e-46aa-d7ee-08dc9805066c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: ODRZaS5Bfm+NGtol6sWV8p5k9dNGGin2U7HEKK3AOU5fj0ISaOE5E/FODa/ptnSaFwVH1ffUdQPr5fPSpXHIvZRbPvHKfatpdeLTX3NobZnN5bsqJG/TwfIu5iFUNA6MP7tD7G1t7JkhcywTvsjCwsfqDHe7n6DH/DgbX5oO8nQn8HmqX7HDrthtFaeiZBpVEPdmFnwF3TXia21kTY9YLhmQ6jzhnHAznFI/9kerj8aX94WNAgo72ZWhrRNl7oZzXDrm8ikKazucKWfb0uSG0es8YASXOc6R/oHce6H0v9WegAiIRXYSzfwLbaHgfaIQdgvqHaaFv+fex5zTu9ae1pe1P8Jzi7lxDHXR5MWHpixtH6A72aiDxbv6A+1sgMNJhvHn5Z8+JsgSFZVRKE24h0dQmJMK38MoOtwR+6BMgcrXaWrfBN2AAycvmhgCeIBIb+b0CHdmfzolLGOB2gNXkfLnjkzEod8GuNJQvSWxBuGFHf0aYEz+G/ZgceQw/4gaE2kPTcbrfghyErfWC+9nfawBgQOfHtFTh3IyhbtcQgEY5+sR/DHcl/P5620CwjIBaDTi3pwTQrqM936zMc6K9pN4DtR3rmdyZsS14mKWt0uyyYb1oouNqoY7Yo/FVuyq/bV8f5S2YjKeQrFs/bOeTy9sULhLoW7Z/O+cyG8EkCtc5lIjiiev+VAOGVoZeqsSN80Umnd8sYEFFzsa63wGTf8m0ZNVED+unszFTzoMvn9kZfsRCw7gGi9nhE+Kcx7fdOcn1AdKyeK+8Rx3P9JDGXCfDjxRaJCxlEYyC2ns8mCtM/6vF1VqSuM49IZxqnxOsLj3RfHgjP/CYlYTycCrGegbk8cIjypgnKGKpWzfIltfXRmLFf2wRejzycvgB4qr2W+O0GX5MYFAcHaoIPH49hXN7xqRfjv+nyUH2Mc+LFKKNW4U65FASiqBEUkZFe10Klq3LlV1bSUFr3MeFFP7mBmaF3y5A6f7DkNk1BPcrvbYwDmvFYe5sQh7KMTfHvqmaSiowiv1T7Arla9qicrHyzb8Pv4qWbBzK59vvEaKkdYnTTpKySrmKVOyIp3Zkb0eTyG7nQFRYIrL//1coZmMMT7XlvOQ6Pap8wHzz69hNgsi8P7OSRQSLZGLhE6O/RBraVtLU1Vh5Y5IwEEx7sof7eQPHcWG5+ymaXsBCnlYj4qpvZMlFmzROuoP+444sj1yvSc0RSy9vlcephixizdC9/MI76erL1gRBtFJEFsNVVWb4PZHxXG3onDmFLUxklM5OggFbcvsZXimzEn8Jkq2rQaUrymRBCvEvIvQbHGfREZUupiYiJN1+jqvKExO35VFNnvQXPSc8Yr4Ce9ciO7Oug== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2158.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iJMrCFSpsrbpsxsTd78nQu6bxZYzZgxMWVND2IVLV7681NZ8Zc3kNkqIrxnubsgxgWh6zODyGEOv997lH4kGUg+K6qiOXN147iwbITMkZTIDrqLoeEIsAhE1uBQziqcxwDAuNVAYuRNbRoECvLrwzrsDfoTl08XzVhAM15F2iqPmOBqjHoD4qHGgReZzDrwDUeqvw6UZ2SJYmgn0HWKv48YB/PxacU2eLXiRbwdgOuxifBr5ZI9GjS/v+xEMDcKSY21ond0pE8JoLd/GH/y2AY9gUHhbSL926jRih57mCl5DkPE5jUZOsFoFHRXjcuI4Lc3eNH2t1rjSYe+6pTWXiYVCb4mTX5cGaxaRtXzQyXzykh9vYNYt+lWhZyPsKxIFUHm9if65/QYvwh/O2v+QEFIQl0MAdfgjL4n0uNfdixyolsflagmAxYdD7D18ANXIkPBXfBvxI4vvrLUTwpe9B1KAm2fCi3JxbXkN9hjuMwy8KVNjGJhdRS+8fr03mVdeCQaVYMLLOKqR6FJT3RADqLOeLKgQNW/ABgVzofO1PuvHLqgVtj3QoB9Ol101qxkvjbiCU7pbLf74Fl6LXYJ/4T2IECsPZPjauep3vmxf5ALlOUIzUYXPqhJTlxTfJQpsFwmSB0wwWT8alhPvc2BFHR6XYfOJyUS4UnJuA8N+btgz4YR/CYFw5McZ3pg893ikBKdq8/nqpjiY9H4A/WJ1tlYscURnsemnPBKAZcSKyGwhl1dX7uXwbOEAKP4zDnhSqM/pdlw8sxmESafWFNerg6bHVkuwpNNTIoDHEFQqUvogVW9GG3FfQoSV5CY5bCXJrwd1Vau/JSuY4W3uaKQSSfyro5LC7xaMcOHf5Ayh0x9c+ms/KB++hwk+VawpGVS4L5XUNymZ3zU4FEMDoiWI8J0+iO/5DY8iP8RO5qHsIxZzmr5sJ+1GcW73x85CHdotdP99OVZtgOyKEovuHvwOBz3Fw/XRTvWVodMs3Kz/JK1RxKeORjNsKk/0c05VCW0KJJj4bONEQyCR8LabGf9/VvZ+0BCjIzlzSb4DSjpuB5STpnx3DdX6MRQfzONnAzfVTZE9YoPoU7SzW5H24eG1ADtTR8CmbWgM4cGG8C+ORkKbrbRgFB7FYAGXGit/6JB4uSwjlz7lxybB8P2Z712F50ASOKSWYzMqI9WX4NilJsfQcosCw6ubVJQPe64t69iW+qi600kny/ziBaBg0PI41a6spWbfTEy8NmW5GW3LMb793eOT7o+0fQlJ415wdBFyLNJ6tK+G+Mq88sYrQkQt2wqJ9dbNUTy9XMuikleg6ErjIGEr8Fhc+jZxe8wVlVGVx7wPIXh7YHak+ZDA9y2eTlesZbGutx3XeJZvnR5emL6/55uzPV190s8BclTkR5/djA0wGKIuY9JT8v11+02WVZk1A8GMEcl7cqcTN5tKvgR11E4CS2ukrKQwWKkzEaCE2wp/YLqR9fHjTbGru4RIpgvXAReU0TTqpN+FKWDfaXbEoygiAWmkKiSeUP/J/95hKDkeg3I47LKHeDIZNgei0GDnswLxHt7gN+YLOsxBavspPG39Q9/HuNFoEBa/jHV592RWSZs2mRgm+spudl3g2zjL+fr3cufWKls6K2I12dU= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: a+Yjpjyfbxw7gfcH54xCilo+QlNM8maa3Hjm94gb4/+Qp6L2wIqbZ3ZjwQDWsXk9I0WZb5T4KpeWW+eu5mQpJJZDyGKeFBdCPN2homX5feEIKrg5r+tG8ev0CF0NLP1si/ZDUtJyk6FmKusEfdTFZyE1+qN7XEtUEAjWh9ODf6nROQrbahoLEgoAo9v4y5oErjKYXroaW7rmzSNAUaq94GR7DHDImmV18F78WsmQrkmDSQe+Qxo11eUKnYucyU+lHKq7bAUJ/shkw2CiF3g3oLUHMb4ePq0CZkMtsezVBtGzshFAT7TvNeArlbe8C1jA7ywKWjXbFx13vwjzH+apO+55FCDASW2vwubEDhT5wqgkSCHUEht9YOF3PVXspvmxIX5wWxVHuw5ZOLLWuHw6IXPJ69ZxmoF2DShP3DjoYjJZVqd0ggenlRc5+NonwvpC0THNrxp8aP85oQjkyK8P7RtpBf0ByP5Hyk+elGgCv/EGmkVqjBC0iox6wSgrGLbAD83OrnxcIoxnkw6aAfnrj4YDsUzh5C3Iu1+T4UAA0qgHD7oz96ff5AMCLwGUfMRmr7YX4T+IO2gISXY1z6pD4cwVk56+YJm0NKs8HVtfYBg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e8f0007-911e-46aa-d7ee-08dc9805066c X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2024 06:30:53.1322 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UoCA2cMcjk8MOQj+IQhBXIO04hntkQzBKiQVZ97W+C8N2a66sEnlPpzXIaYYNMviTTH0p/JVBiXMccLupSTZRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB8081 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-29_02,2024-06-28_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=964 adultscore=0 mlxscore=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2406290046 X-Proofpoint-GUID: wvtWvSIR8CITl7BOC708w-EDS_bH2rTD X-Proofpoint-ORIG-GUID: wvtWvSIR8CITl7BOC708w-EDS_bH2rTD X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org |
Series |
Improvements in SFrame documentation
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Test passed |
linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Test passed |
Commit Message
Indu Bhagat
June 29, 2024, 6:30 a.m. UTC
[Changes in V2] - Use @example instead of @code. - Use Title case consistently. [No changes in V2] Add an appendix to provide a rough outline to show how to generate stack traces using the SFrame format. Such content should hopefully aid the reader assimmilate the information in the specification. libsframe/ * doc/sframe-spec.texi: Add new appendix. --- libsframe/doc/sframe-spec.texi | 60 ++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+)
Comments
Hello Indu, I very much appreciate your effort in enhancing the SFrame documentation! In general it looks great! There are just a few minor flaws in the unwinding logic sample code. Am 29.06.2024 um 08:30 schrieb Indu Bhagat: > [Changes in V2] > - Use @example instead of @code. > - Use Title case consistently. > [No changes in V2] > > Add an appendix to provide a rough outline to show how to generate stack > traces using the SFrame format. Such content should hopefully aid the > reader assimmilate the information in the specification. > > libsframe/ > * doc/sframe-spec.texi: Add new appendix. > --- > libsframe/doc/sframe-spec.texi | 60 ++++++++++++++++++++++++++++++++++ > 1 file changed, 60 insertions(+) > > diff --git a/libsframe/doc/sframe-spec.texi b/libsframe/doc/sframe-spec.texi > index 4d1d12c8598..fccb404f59e 100644 > --- a/libsframe/doc/sframe-spec.texi > +++ b/libsframe/doc/sframe-spec.texi > @@ -54,6 +54,9 @@ low-overhead mechanism to generate stack traces. > * SFrame Section:: > * ABI/arch-specific Definition:: > > +Appendices > +* Generating Stack Traces using SFrame:: > + > Indices > * Concept Index:: > @end menu > @@ -824,6 +827,63 @@ Hence, in summary: > @item 3 @tab FP = CFA + offset3 > @end multitable > > +@node Generating Stack Traces using SFrame > +@appendix Generating Stack Traces using SFrame > + > +Following pseudocode highlights how SFrame provides a simple, fast and > +low-overhead mechanism to generate stack traces. > + > +For sake of brevity, only the core algorithm to get the @emph{next frame} > +(given the current frame) is outlined below. Needless to say that for > +generating accurate and useful stack traces, several other aspects will need > +attention: finding and decoding bits of SFrame section(s) in the program > +binary, symbolization of addresses, to name a few. That said, establishing the > +first frame should be trivial: > + > +@example > + // frame 0 > + frame->pc = current_IP; > + frame->sp = get_reg_value (REG_SP); > + frame->fp = get_reg_value (REG_FP); > +@end example > + > +Next, given frame N, generating stack trace needs us to get frame N+1. This > +can be done as follows: > + > +@code {int err = get_next_frame (&frame, pc, sp, fp);} > + > +where @code{get_next_frame} populates the RA, SP, and FP values in the provided > +@code{frame} object and return the error code, if any. In the following code, > +the @code{sframe_*} functions fetch information from the SFrame section. > + > +@example > + fre = sframe_find_fre (pc); > + if (fre) prev_frame = frame; > + base_reg = fre->base_fp_p ? REG_FP : REG_SP; My understanding of the previous code is that REG_FP and REG_SP identify register numbers and not their respective contents. base_reg_val = fre->base_fp_p ? prev_frame->fp : prev_frame->sp; > + cfa_offset = sframe_fre_get_cfa_offset (fre); > + // Get fixed RA offset or stack offset from FRE as applicable. > + ra_offset = sframe_fre_get_ra_offset (fre); > + fp_offset = sframe_fre_get_fp_offset (fre); > + > + cfa = base_reg + cfa_offset; Using above notion this calculates the sum of a register number with the CFA offset. cfa = base_reg_val + cfa_offset; > + frame->sp = cfa; > + > + ra_stack_loc = cfa + ra_offset; > + // Get the address stored in the stack location. > + frame->pc = read_value (ra_stack_loc); > + > + if (fp_offset is VALID) > + fp_stack_loc = cfa + fp_offset; > + // Get the value stored in the stack location. > + frame->fp = read_value (fp_stack_loc); > + else > + // continue to use the value of fp as it has not > + // been clobbered by the current frame yet. > + frame->fp = fp; fp has not been introduced so far. frame->fp = prev_frame->fp; > + else > + ret = ERR_NO_SFRAME_FRE; > +@end example > + > @node Concept Index > @unnumbered Concept Index > Regards, Jens
On 7/1/24 06:39, Jens Remus wrote: > Hello Indu, > > I very much appreciate your effort in enhancing the SFrame > documentation! In general it looks great! There are just a few minor > flaws in the unwinding logic sample code. > > Am 29.06.2024 um 08:30 schrieb Indu Bhagat: >> [Changes in V2] >> - Use @example instead of @code. >> - Use Title case consistently. >> [No changes in V2] >> >> Add an appendix to provide a rough outline to show how to generate stack >> traces using the SFrame format. Such content should hopefully aid the >> reader assimmilate the information in the specification. >> >> libsframe/ >> * doc/sframe-spec.texi: Add new appendix. >> --- >> libsframe/doc/sframe-spec.texi | 60 ++++++++++++++++++++++++++++++++++ >> 1 file changed, 60 insertions(+) >> >> diff --git a/libsframe/doc/sframe-spec.texi >> b/libsframe/doc/sframe-spec.texi >> index 4d1d12c8598..fccb404f59e 100644 >> --- a/libsframe/doc/sframe-spec.texi >> +++ b/libsframe/doc/sframe-spec.texi >> @@ -54,6 +54,9 @@ low-overhead mechanism to generate stack traces. >> * SFrame Section:: >> * ABI/arch-specific Definition:: >> +Appendices >> +* Generating Stack Traces using SFrame:: >> + >> Indices >> * Concept Index:: >> @end menu >> @@ -824,6 +827,63 @@ Hence, in summary: >> @item 3 @tab FP = CFA + offset3 >> @end multitable >> +@node Generating Stack Traces using SFrame >> +@appendix Generating Stack Traces using SFrame >> + >> +Following pseudocode highlights how SFrame provides a simple, fast and >> +low-overhead mechanism to generate stack traces. >> + >> +For sake of brevity, only the core algorithm to get the @emph{next >> frame} >> +(given the current frame) is outlined below. Needless to say that for >> +generating accurate and useful stack traces, several other aspects >> will need >> +attention: finding and decoding bits of SFrame section(s) in the program >> +binary, symbolization of addresses, to name a few. That said, >> establishing the >> +first frame should be trivial: >> + >> +@example >> + // frame 0 >> + frame->pc = current_IP; >> + frame->sp = get_reg_value (REG_SP); >> + frame->fp = get_reg_value (REG_FP); >> +@end example >> + >> +Next, given frame N, generating stack trace needs us to get frame >> N+1. This >> +can be done as follows: >> + >> +@code {int err = get_next_frame (&frame, pc, sp, fp);} >> + >> +where @code{get_next_frame} populates the RA, SP, and FP values in >> the provided >> +@code{frame} object and return the error code, if any. In the >> following code, >> +the @code{sframe_*} functions fetch information from the SFrame section. >> + >> +@example >> + fre = sframe_find_fre (pc); >> + if (fre) > > prev_frame = frame; > >> + base_reg = fre->base_fp_p ? REG_FP : REG_SP; > > My understanding of the previous code is that REG_FP and REG_SP identify > register numbers and not their respective contents. > > base_reg_val = fre->base_fp_p ? prev_frame->fp : prev_frame->sp; > Ah yes, I should use the passed fp, and sp args to the function. >> + cfa_offset = sframe_fre_get_cfa_offset (fre); >> + // Get fixed RA offset or stack offset from FRE as applicable. >> + ra_offset = sframe_fre_get_ra_offset (fre); >> + fp_offset = sframe_fre_get_fp_offset (fre); >> + >> + cfa = base_reg + cfa_offset; > > Using above notion this calculates the sum of a register number with the > CFA offset. > > cfa = base_reg_val + cfa_offset; > Done. >> + frame->sp = cfa; >> + >> + ra_stack_loc = cfa + ra_offset; >> + // Get the address stored in the stack location. >> + frame->pc = read_value (ra_stack_loc); >> + >> + if (fp_offset is VALID) >> + fp_stack_loc = cfa + fp_offset; >> + // Get the value stored in the stack location. >> + frame->fp = read_value (fp_stack_loc); >> + else >> + // continue to use the value of fp as it has not >> + // been clobbered by the current frame yet. >> + frame->fp = fp; > > fp has not been introduced so far. > > frame->fp = prev_frame->fp; > I have adapted this pseudocode to address these concerns and committed the series. Thanks for reviewing. Indu >> + else >> + ret = ERR_NO_SFRAME_FRE; >> +@end example >> + >> @node Concept Index >> @unnumbered Concept Index > > Regards, > Jens
diff --git a/libsframe/doc/sframe-spec.texi b/libsframe/doc/sframe-spec.texi index 4d1d12c8598..fccb404f59e 100644 --- a/libsframe/doc/sframe-spec.texi +++ b/libsframe/doc/sframe-spec.texi @@ -54,6 +54,9 @@ low-overhead mechanism to generate stack traces. * SFrame Section:: * ABI/arch-specific Definition:: +Appendices +* Generating Stack Traces using SFrame:: + Indices * Concept Index:: @end menu @@ -824,6 +827,63 @@ Hence, in summary: @item 3 @tab FP = CFA + offset3 @end multitable +@node Generating Stack Traces using SFrame +@appendix Generating Stack Traces using SFrame + +Following pseudocode highlights how SFrame provides a simple, fast and +low-overhead mechanism to generate stack traces. + +For sake of brevity, only the core algorithm to get the @emph{next frame} +(given the current frame) is outlined below. Needless to say that for +generating accurate and useful stack traces, several other aspects will need +attention: finding and decoding bits of SFrame section(s) in the program +binary, symbolization of addresses, to name a few. That said, establishing the +first frame should be trivial: + +@example + // frame 0 + frame->pc = current_IP; + frame->sp = get_reg_value (REG_SP); + frame->fp = get_reg_value (REG_FP); +@end example + +Next, given frame N, generating stack trace needs us to get frame N+1. This +can be done as follows: + +@code {int err = get_next_frame (&frame, pc, sp, fp);} + +where @code{get_next_frame} populates the RA, SP, and FP values in the provided +@code{frame} object and return the error code, if any. In the following code, +the @code{sframe_*} functions fetch information from the SFrame section. + +@example + fre = sframe_find_fre (pc); + if (fre) + base_reg = fre->base_fp_p ? REG_FP : REG_SP; + cfa_offset = sframe_fre_get_cfa_offset (fre); + // Get fixed RA offset or stack offset from FRE as applicable. + ra_offset = sframe_fre_get_ra_offset (fre); + fp_offset = sframe_fre_get_fp_offset (fre); + + cfa = base_reg + cfa_offset; + frame->sp = cfa; + + ra_stack_loc = cfa + ra_offset; + // Get the address stored in the stack location. + frame->pc = read_value (ra_stack_loc); + + if (fp_offset is VALID) + fp_stack_loc = cfa + fp_offset; + // Get the value stored in the stack location. + frame->fp = read_value (fp_stack_loc); + else + // continue to use the value of fp as it has not + // been clobbered by the current frame yet. + frame->fp = fp; + else + ret = ERR_NO_SFRAME_FRE; +@end example + @node Concept Index @unnumbered Concept Index