From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id i4yGMj8qr2iwkg0AWB0awg (envelope-from ) for ; Wed, 27 Aug 2025 11:54:39 -0400 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=L7sNyZ+h; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id BB5C91E04C; Wed, 27 Aug 2025 11:54:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 0BAE81E023 for ; Wed, 27 Aug 2025 11:54:36 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 82BE338515C0 for ; Wed, 27 Aug 2025 15:54:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 82BE338515C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1756310075; bh=dwUd7ZWqP/Ltq1VATJyI7JlEMFP+hwuNq3yKE9LL6CQ=; h=To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=L7sNyZ+hmLY67YpYpQQM+9yih+vDQCga72HomfBUQoW+6D4h3HC35UWt2a+zN2rjQ g2k2nqZA0pmbq1y7WOsCB7AH896jzC7WH6zoMM+ePSJ+0cCCdKTgK9Mhxg1IFO54wp 5dATBP4r7Xk/LbfiMYeJmG6z4g1h6AINKviRjXGs= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id E60EC3839E01 for ; Wed, 27 Aug 2025 15:53:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E60EC3839E01 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E60EC3839E01 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756310029; cv=none; b=gd0sR4Qefg9Z2/WJHxW4oUNuYBogUBTG3dSIXG+7w1Ds2OxXKivYYIH4vwr9Wr2OvYubA6BlVsBbSdffIwfoP5teqyR6ImeuuoqgYjs+Hvs8J40RHUSxrHgV1SVODUqAP2kQ/umvpcaaANdCVYwOTPj6scqOTTEqjXkdGk/xw+4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1756310029; c=relaxed/simple; bh=bOGE/O8dXrH5giLk0tCJEfdOaQbwqNjyv5LXDDuhJ3c=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=geKTIXwI7cGQAL/i5C4V6fjDqxlj/NDbLFyBpYP/cniLpdJ/IoGZys57YcI9zI3VyHBYSCL4GffZbpK+DACtdOUcrNBZ91ygmeVyiRfyfOEQTRc8xb1YR0MNRSINYOEaAWUdm0E5JxVm/OUJ7e7Axhb1HUsHETFKJl+3cMSPjuo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E60EC3839E01 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-550-4OH0EqYzNweE6BFcJ4IiLA-1; Wed, 27 Aug 2025 11:53:47 -0400 X-MC-Unique: 4OH0EqYzNweE6BFcJ4IiLA-1 X-Mimecast-MFC-AGG-ID: 4OH0EqYzNweE6BFcJ4IiLA_1756310026 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-45b612dbc28so22731745e9.0 for ; Wed, 27 Aug 2025 08:53:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756310026; x=1756914826; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dwUd7ZWqP/Ltq1VATJyI7JlEMFP+hwuNq3yKE9LL6CQ=; b=BCEMN+MnzZOHpAWx63KtCn4SOZl/UGuPYzc+aZAPW0wl/TfpoTYw/rPiI7WpVbInBo sPjK0QVZO/X9zkgOA9K/G4mS5X83e6GRHYyRFH6pRs1pOeemCxJ0kL+IeQUf6npkcoMD L2gATRNUGNj0YqRykq1DYNF97koLiyvoL4aRBZv9OgrQdJi2gvYDD1wZx8YWv/O+cD4L /LAgKZmuwSqL+TYqgW8sK2lE5SF2jheJejDp6UvF0DLLzNIScqmHoxCHlZVUqZx7vxk9 zDWdkaajAUvO7SrWOE9i7SDg4TP9rWBuJ+qrcW1lzwHFQnYiKKwL9bmepiNzO3t5+lZh JvhQ== X-Forwarded-Encrypted: i=1; AJvYcCV/+My7p7MryEU5COwmltLo27DusprIBy36+6MHgwK7ZCzTQVNZy31wIQOUPeqXNxN8F94=@sourceware.org X-Gm-Message-State: AOJu0YxqgC1MCgP8o4jNNgdpWruVGg1fBTJnYQqzaBmeaYIfqZDldvnt Zs5QeSw7wPorpUy/9Ayl8Ix0fxnMaG8rlJRIGKEcKHRerOLAPK2PS6x3GcMq9tEmNb+PUXQOUKe 0Gzei4mvOqYrnnY0s1gI6LTSwAr+1/LRPtHw8k3g7k/AVm662zE9NlpKzvDp0 X-Gm-Gg: ASbGncsnPXr9hpxJbW7N9oaXfvl0vnOz+rfleSJQohLcbWZdRdP8URprM32roo5G+VW FyfEjA/dFYMIBqDs+7RxFWVHLjK+aBSfmc7i9DuUrH7oGg5WTn0diTgg3XOVE+rkBo6yfiMWH8A GUBIVrhapceUpGbUib837RnV1dMs9uXJM5goUjOdTeYlanfyGBqQsaczvZJITLZmzymBQiXUnFy 7qYSirAjreImwd8kbcNtsx1oT3K1DumLlm4RCX87R2XSvyM+3LJRfuAwC5V19cpZPy6hWs7AQHD eA97ijI2qrO4habY4c3K9pAAHb+q3OxkER0= X-Received: by 2002:a05:600c:1389:b0:455:f59e:fd9b with SMTP id 5b1f17b1804b1-45b517c584cmr200326335e9.24.1756310025781; Wed, 27 Aug 2025 08:53:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4SKA3GLXrgvbYGLbTv83cBNsstDNVUgM5ePhdfFwmeapdzWosb7EBbYx+9GdfCHBqOrCHlg== X-Received: by 2002:a05:600c:1389:b0:455:f59e:fd9b with SMTP id 5b1f17b1804b1-45b517c584cmr200326145e9.24.1756310025284; Wed, 27 Aug 2025 08:53:45 -0700 (PDT) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3ccf46fe4e7sm2659856f8f.11.2025.08.27.08.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Aug 2025 08:53:44 -0700 (PDT) To: Robert Dubner , gdb@sourceware.org Cc: mheyman , jklowden@cobolworx.com Subject: Re: COBOL support in GDB In-Reply-To: <055c01dc1230$fe0c2050$fa2460f0$@symas.com> References: <055c01dc1230$fe0c2050$fa2460f0$@symas.com> Date: Wed, 27 Aug 2025 16:53:42 +0100 Message-ID: <878qj469rt.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: JK8kLMuze3jP4808-Lg47eDoQw_zGvGL_NtaGCKVNq4_1756310026 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: Andrew Burgess via Gdb Reply-To: Andrew Burgess Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" Robert Dubner writes: > My name is Bob Dubner. I live in upstate New York, in the United States. > I work for the Symas Corporation, which has an interest in COBOL-based > systems. For the last several years I have been working along with my > colleagues Marty Herman and Jim Lowden to develop a COBOL front end for > the GCC compiler collection. > > > > That front end, with much gratefully received assistance and support from > the GCC community during the incorporation phase, was released back in > March as part of GCC-15.1. > > > > So, with GCC now able to compile COBOL, a natural next step is the > capability of debugging COBOL code. > > > > About three years ago, we forked binutils-gdb on > https://gitlab.cobolworx.com/COBOLworx/gdb-cobol. That's where I have > been developing support in GDB for the COBOL language as implemented in > GCC's COBOL front end. I regularly merge the master branch of > git://sourceware.org/git/binutils-gdb.git into our fork, most recently > today. > > > > I have the COBOL-aware debugger actually working. Somebody who can > navigate the multiple gates of > > > > 1) Access to an Ubuntu 22 or 24 system, > > 2) A willingness to download and install the leading-edge COBOL compiler > from https://gitlab.cobolworx.com/COBOLworx/gcc-cobol/-/packages, > > 3) A matching willingness to download and install the leading-edge > GDB-COBOL debugger from > https://gitlab.cobolworx.com/COBOLworx/gdb-cobol/-/packages > > 4) Actually caring enough about COBOL to go through steps 1 through 3 > > > > can then use the resulting installed gcobol compiler to compile a COBOL > program and then use gdb-cobol to debug it. My intent, so far, is that > GDB users will not be surprised by what ordinary GDB commands do when > debugging a COBOL program. > > > > I am writing here because it is my belief that we can at least start > talking about incorporating my cobol_language work into GDB. > > > > It involves eight new files in the gdb directory, all named > "cobol-". There are some changes to code elsewhere in the gdb > subdirectory. > > > > I anticipate that there will be a fair amount of polite interaction about > some of my changes that will, nonetheless, come from a place of "Why in > the name of all that is holy did you do THAT??!!" > > > > The answers to those perfectly valid questions will be rooted in two > places. > > > > First, COBOL is weird. > > > > Second, I didn't know any better. > > > > So, I need guidance on how to proceed. Perhaps I should come up with a > patch that just installs the some of the cobol-xxx files, so that my work > can be evaluated? I am sure there will be questions, and comments, and > protests that I will have to address. > > > > Or what? Hi! I don't see why anyone would object to having COBOL support added to GDB, especially as the COBOL frontend has been added to gcc. I would certainly have no objections. I took a (very) quick look at you git repo, and you are correct to think there is a bunch of stuff that's going to require some serious thought for how to integrate nicely with current GDB. I'm looking especially at the language specific hooks into generic code step/next, breakpoint creation, etc. I haven't tried to seriously review any of this work, but I think you should understand getting some of this merged might require wider refactoring in order to try and keep core code relatively clean. But that's just a guess, I could be wrong. For getting the code merged, or starting the review process, the first step would be making sure there's a copyright assignment in place with the FSF. I guess you have this already for gcc? But you should make sure it also covers GDB, and if not, get the existing agreement extended. Got getting patches reviewed and merged, I think you need to break the work down into the smallest set of changes possible. Especially where you're touching core code. So, personally, for a new language, I'm less bothered about large changes coming in to cobol-*.{c,h} files, as the new language is, well, new. But if you tried to land all your changes to breakpoint.c, infcmd.c, infrun.c, location.c, etc, etc in one patch, I'm for sure going to ask that to be broken apart so we can review one problem at a time. Also tests. We love testing in GDB, and I noticed your branch seemed a little light on testing, so that'll need fixing for sure. Thanks, Andrew