From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id dkY6CpySE2n1GzcAWB0awg (envelope-from ) for ; Tue, 11 Nov 2025 14:46:36 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=AlOoqI/q; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1C6641E04C; Tue, 11 Nov 2025 14:46:36 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9EAEE1E04C for ; Tue, 11 Nov 2025 14:46:35 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 24B053858C52 for ; Tue, 11 Nov 2025 19:46:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24B053858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1762890395; bh=ltumev4e8uwbyV71pOEZ1gx+z++ewBfUqJPYjJUEWtk=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=AlOoqI/qDuy/DiEu/6pgWRVxe7PL+HlcXrY0F/aie8ICW1FZamInezoZTt1R7RavE /JB4myAn51TlOlw2ZZLzQB/TTMiIC9oyOyXS4L0aH65AcbVd7omkDcDSOKeWzlddav UNPnijq41gR8Yk/AVr/8Pni2t41ZvclYDY4G1udw= Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by sourceware.org (Postfix) with ESMTPS id 19A943858C51 for ; Tue, 11 Nov 2025 19:45:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19A943858C51 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 19A943858C51 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762890346; cv=none; b=bAY2AFCedTTM6/eF1EUxr54XSRHeaBMzOebpkrW3pJFiLrhZ3rlALBQJv6X3Rjj1L3uP27RXMxOFt0GVGvMcg7EWiBx/AdXWSMMEcBtnfSH2MIfak534DONJvFNyazb0gr8tyiSOKfHEUkgZom6MfcwQJzO5Cxc1Z/t78HZQuu4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762890346; c=relaxed/simple; bh=fIKj2ldlZSMsHUvUvyq6wpS4kh2lFNlvztAD0ZYutEc=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=GurX+xze9pzVj1h1ayCidqsbzPe7V2vvnB47ZFV+9mHdCIkXRYIkRR5ruWOv8PCN1zhVegqpFjldH+F/si+pqzuOgb73Pt1t1qGN7AjhYcwDMrWOzQDa3dSCoHOyoqPLMk0lty3NnBI9mAP5MxckkdNrmC7F1Mvup5lr4P/EpF0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19A943858C51 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-787df0d729dso860227b3.3 for ; Tue, 11 Nov 2025 11:45:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762890345; x=1763495145; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fIKj2ldlZSMsHUvUvyq6wpS4kh2lFNlvztAD0ZYutEc=; b=NzSglcOPKrRlOz1YTzG2xookqsQj5XlGjDV7qU/0+MbPdrabtSlC5QwdJJ1+t5uO+a 7P/r9wyu/oTBnSOKdxfyPU/GGlp5jGv4OkQlxoCxF7hCdkFVwRNfmueq6vKvN1iToFPy HWMBzUopSzntto+rAzUl1Rn0o7mqtNOWDe8FkB5VHBSbAdtsqprfH8HeVtb3X6T8wtl7 YhJs9B+0AnfmU7RCqySoJyu0CRITL7cu0nOynLvU5DE+ey1Bmr7lTR6awX7zmIVZplrP ditEMOW71PXnz87gYwpw24h8Vq0twnX2/Z4k0Rf67e5VpopMNSoeitvDqObzkvMnhDQ8 e8HQ== X-Gm-Message-State: AOJu0Yx2ChEhesKhmeMH4ZPoiNfEOIyUCHZJDFToZglfS/5lew0Byl8T NBWAfWaPM8FgIWfE2kGrB0oD7mh1bsmdLH9LCK/CLROW0iS1y30W0Dm6vtTqmzIj9UdPd767heM 0ifgqQjlMuHlHY5Oy1V0m/d0Jjl6nkWoj8g== X-Gm-Gg: ASbGncsmJn6Sg8PN82yUPlHeOxitDN/DlRdTVGwoUw50WvmpXuiuLDXqlm4Q3/Uffqo KLXpHm95AOJl7rSl7oiXGA7p4JHY+j+wclVSQ5GB+oE4UmIb/dpSpjydDfYSCwz/yOgaL/lVqg+ q5DxR+LtmmuLC+ccHNUTpxJdGSfyFhx4EDsZPhPbu2+i0P2fm1xc32l0ujITxvE8tTjM7JTS5MD AmTvhVO5+fI9zHFUXAiYVwyjw6nEtSbEF1qCUQ/uBdEJAtz9VXfBwxeqHsUAaQz4XbE9+cSQdQ4 RJhR7ls= X-Google-Smtp-Source: AGHT+IF1IRdvjpbV8ZBxAu1u3LVmxks/wrgZRv6yLtokQvym3eO/ZYSyHG5rgaGWDJukbk0uGk3lI4ujttWLRPkhOsQ= X-Received: by 2002:a05:690c:a1cd:b0:781:534:e754 with SMTP id 00721157ae682-7881363d1bfmr1691377b3.21.1762890345419; Tue, 11 Nov 2025 11:45:45 -0800 (PST) MIME-Version: 1.0 Date: Tue, 11 Nov 2025 22:43:45 +0100 X-Gm-Features: AWmQ_bnPdA1nD9Lws8BMgb2Ym36cGlcbMOqqb-mieyA7R_JFq-WEWjiYOr7Gqvs Message-ID: Subject: GDB-JIT: why would my 'unwind' not be invoked on crash? To: gdb Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.30 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: K via Gdb Reply-To: K Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" I implemented this for the x86-64 build of my ocaml program and it works fine. I'm now working on a aarch64 version - the symtable/line and serde code is the same, and I'm looking to complete the unwind functionality by disovering how to obtain the PC (not in a general register). However, after arranging for a segfault the unwind function is not being invoked at first and I get 2 backtrace listings with appropriate function name and line numbers, and only then does gdb decide to call my unwind function and it does so with garbage data. This is understandable to the extent gdb doesn't know the ocaml stack usage. But if that's true, why would it proceed to generate 2 lines of backtrace before consulting my unwinder to gather the correct data? My expectation is it would consult my unwinder immediately. By the way, there is no frame pointing register used in the ocaml compiler I'm using. Any insights appreciated!