From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E2E1B3858C2C for ; Tue, 21 Mar 2023 09:23:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E2E1B3858C2C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679390592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8pKh1aQ4/axEmqgXr5eRYPsezazgTUVe+JiTDcGT70U=; b=UVhNiO0k6DAB4p+6E8Ouvm7IaUYBvQFSyKvGxC1Un0KFFxSGgaeAepizn1zIf8CQwx9+wx UdNjQEZVQ7ktVMWB9SBD70H+7+y/XXG0FmDUQHcf2jDpt5YcA2nrH9k4eDFMBn0V/l+6fA a0AVxhx2UD1QurjCeXVLakuFKZbYwUc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-618-bLjQEo1hMIGt0aI78vPsdA-1; Tue, 21 Mar 2023 05:23:10 -0400 X-MC-Unique: bLjQEo1hMIGt0aI78vPsdA-1 Received: by mail-wm1-f69.google.com with SMTP id bi5-20020a05600c3d8500b003edda1368d7so2405973wmb.8 for ; Tue, 21 Mar 2023 02:23:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679390589; 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=8pKh1aQ4/axEmqgXr5eRYPsezazgTUVe+JiTDcGT70U=; b=KpDJTK2pSDDDykAkcuATrBy+t4rX2WxqOgYkB3BVm7ETWtrqsIXhfhnLKv0Cnm1Gc+ cXKFYHIav/QYNmNbIQXIgov1sqdyp00g4/egqC7DSJBpOWuLj4pwAHVRyg2kPMDDifaV FU/FrBtm71U+d6MO/uN8JH6thpWba+uwJji7ozkF8BGyw7OK+jghESrOMr4MnQqB6Qat 1eWpvucqdpFmHnXyia9534uih81RtrtKrF3WIXsuTxBjZuIet3QQ83F0WlSWeYCJTbCe 6br3JnsonX1JGM6Vqm3U5KBw7sJrJ/wEURnqypCRZY+DUz4cS3/q4DJoPRh2T0X4mBWm w/pQ== X-Gm-Message-State: AO0yUKXbIDO3khg15j4hj5uSbhH6B5HMdxrj6ccvN208/BzqGuGb9ghz COAGv5arF+shLAkB1s2JpNKk5i+Gabn1E72tVqObmwsp8a0XXsIU8iMDm756lw8uHUAmIIO3FMK Mr2VDX8Bnqg5QQzLJRehn1imTyO4WHA== X-Received: by 2002:a05:6000:110a:b0:2cf:f060:39d2 with SMTP id z10-20020a056000110a00b002cff06039d2mr1546058wrw.58.1679390588975; Tue, 21 Mar 2023 02:23:08 -0700 (PDT) X-Google-Smtp-Source: AK7set9TK7Z1OB/rioS/acUZ9VCnTheKJGdvfsQ/pP3+MbgsUYI4CH1Vwz8aR+sDXjQOmuYDTJjxMA== X-Received: by 2002:a05:6000:110a:b0:2cf:f060:39d2 with SMTP id z10-20020a056000110a00b002cff06039d2mr1546048wrw.58.1679390588683; Tue, 21 Mar 2023 02:23:08 -0700 (PDT) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id s13-20020a5d510d000000b002c794495f6fsm7823364wrt.117.2023.03.21.02.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 02:23:08 -0700 (PDT) From: Andrew Burgess To: Simon Marchi , Simon Marchi via Gdb-patches Cc: Simon Marchi Subject: Re: [PATCH] gdb: make "maintenance info line-table" show relocated addresses again In-Reply-To: References: <20230320163003.32960-1-simon.marchi@efficios.com> <87y1nrcdim.fsf@redhat.com> Date: Tue, 21 Mar 2023 09:23:07 +0000 Message-ID: <87o7omcvb8.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 Marchi writes: > On 3/20/23 17:35, Andrew Burgess via Gdb-patches wrote: >> Simon Marchi via Gdb-patches writes: >> >>> Commit 1acc9dca423f ("Change linetables to be objfile-independent") >>> changed "maintenance info line-table" to print unrelocated addresses >>> instead of relocated. This breaks a few tests on systems where that >>> matters. The ones I see are: >>> >>> Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/consecutive.exp ... >>> FAIL: gdb.base/consecutive.exp: stopped at bp, 2nd instr (missing hex prefix) >>> Running /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/async.exp ... >>> FAIL: gdb.base/async.exp: stepi& >>> FAIL: gdb.base/async.exp: nexti& >>> FAIL: gdb.base/async.exp: finish& >>> >>> These tests run "maintenance info line-table" to record the address of >>> some lines, and then use these addresses in expected patterns. >>> >>> For the time being, I suggest simply reverting the command to show >>> relocated addresses. >> >> This makes sense to me. When I use 'maint info line-table' it's usually >> because I want to try and match up the line table with the code being >> executed, so having the relocated addresses would be far more useful. >> >> Reviewed-By: Andrew Burgess > > What would you think about showing both, like this? > > (gdb) maintenance info line-table > objfile: /home/simark/build/binutils-gdb/gdb/a.out ((struct objfile *) 0x614000007240) > compunit_symtab: test.c ((struct compunit_symtab *) 0x621000123890) > symtab: /home/simark/build/binutils-gdb/gdb/test.c ((struct symtab *) 0x621000123910) > linetable: ((struct linetable *) 0x62100015fc20): > INDEX LINE REL-ADDRESS UNREL-ADDRESS IS-STMT PROLOGUE-END > 0 6 0x0000555555555119 0x0000000000001119 Y > 1 7 0x000055555555511d 0x000000000000111d Y > 2 8 0x0000555555555123 0x0000000000001123 Y > 3 END 0x0000555555555125 0x0000000000001125 Y > > I think it could be useful to match the unrelocated address with what > you see in the DWARF info. If the objfile is not position-independent, > or not relocated yet, the two columns show the same values. I'm never going to complain about more information. Especially not in maintainer commands. Just wanted to make sure my use case was noted. Thanks, Andrew