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.129.124]) by sourceware.org (Postfix) with ESMTPS id 155953858D20 for ; Mon, 6 Nov 2023 15:16:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 155953858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 155953858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699283798; cv=none; b=HOQFEfnrKaco01GKTVEvBVmhKHjdvBgHL24wUwIEo9tYJWkL/GiBtUweO+Tb/O/FmXu+BZeHuOB2fbZAAoYRqFBSmxafuFMsqt30C9zOlWzL4K8gUGXEq4XY/ofjSwSVv1nGN+IHJYG9f8Hll2v/q1zZeJJ28ZPom/im1OVjAPY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699283798; c=relaxed/simple; bh=8LDCh0k9vz67CzlzuPCOG7+pL/8u3RGZDyKh8GlAeH8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=l3nrDQZEXzpWWX5ayiwsBMYjn+Y2bLFhCokMBtFzWJyPXfHtU/FmeKeS993TR0HwKPD01XHTwLUhpXWGtIL3xQqGS4YtJ7F7xbH8OlzsQ0iB9+ZsnozCoeyhR1ZUvMZHwk3/fDYM8vkYFQ6WEh/vZyNxX5yEBkWx1UH3+J4v++o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699283795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dO+2kRXiitaV60mfH1eup3lhGKIwoSkDuAq69L/7k2E=; b=QX9DQAClOrBmP1j7jt9OfNfz8UD9T49cjbRn074KIskYCHjKEdIFtBjbfIprtaiJxmYRd8 nzEyta3Xn50WBPvogMzKmlM15Ml9+JeCj34b8cDwxu3t4oP5rk/j0tH6IuNRnxeqrDfl7N h7AOos4UiUaCrL6nZozfeWw5n2jXhVI= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-xOkH5EfmOo-mRhPrlBy-KA-1; Mon, 06 Nov 2023 10:16:34 -0500 X-MC-Unique: xOkH5EfmOo-mRhPrlBy-KA-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-66d026cae6eso57336146d6.3 for ; Mon, 06 Nov 2023 07:16:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699283793; x=1699888593; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dO+2kRXiitaV60mfH1eup3lhGKIwoSkDuAq69L/7k2E=; b=iP2I+2ISL0muZpyFwVQugzNSR1nGnTLi6vrvXDrboC3SD2Ca8Nr2Ji7CmhP+wppGfw lsFlVSIOQeiu85BRvcEXLHG25zpnowd0dNNdDTkwTjkKeuYszdKRI2LjTgEPyPOZJ7kv M8Q7rPHsx812e594sKBQVUBYVsWt3Udfng/5/dsZOwIyTcqj96A0u7vDDhES6C8dAJpx Q9gVUSG+GIBngc8hUkKJAWuXz1aRrFfwn/GkwAyz1D1xXUdCLT9wAA7UUmac6lry48q+ HFO9olePz1McIrG9trbaDzwTtjf9jxoTBJ/2Lg/znIlVHa7w0rV3uGaSi2MByaWBMG7o iRKg== X-Gm-Message-State: AOJu0Yz7iJYBoq8Kj42AfKqk63ZChb+D49PcAMuUAShnTatZMVAGtozT oNP/w7cuLD0eSpT4YOxHmVksVXyw0DvZGje3Gt+MmR7XBQ0bVj1ir2/nvqJJ3K1D/ChyZY1WAAU 8SG4Q43Re54S17O3cpVn9qlS0i2xbgw== X-Received: by 2002:ac8:5882:0:b0:41c:d916:75d9 with SMTP id t2-20020ac85882000000b0041cd91675d9mr32252047qta.32.1699283793531; Mon, 06 Nov 2023 07:16:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpQif2xJd5UcYZqrNP4SAD4l4DLWUOyepSQIjitSWcQZitZEHCzwY8jRehkgAdIur8R9PkWg== X-Received: by 2002:ac8:5882:0:b0:41c:d916:75d9 with SMTP id t2-20020ac85882000000b0041cd91675d9mr32252032qta.32.1699283793263; Mon, 06 Nov 2023 07:16:33 -0800 (PST) Received: from localhost (105.226.159.143.dyn.plus.net. [143.159.226.105]) by smtp.gmail.com with ESMTPSA id jv12-20020a05622aa08c00b0041b016faf7esm3484770qtb.58.2023.11.06.07.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 07:16:32 -0800 (PST) From: Andrew Burgess To: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 00/31] Baby step for objfile splitting In-Reply-To: <20231105-split-objfile-2023-bound-sym-october-v2-0-dbd2d158bbc3@tromey.com> References: <20231105-split-objfile-2023-bound-sym-october-v2-0-dbd2d158bbc3@tromey.com> Date: Mon, 06 Nov 2023 15:16:31 +0000 Message-ID: <87y1faud2o.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.4 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: Tom Tromey writes: > Every year or so, I take a stab at the objfile splitting work. This > always fails and I end up not sending anything. For those of us who aren't familiar with the background here. Do you have a link to a previous description of, or could you give a description of, what the "objfile splitting work" is about. What's the longer term goal, of which this series is a step towards. Thanks, Andrew > > This year, I decided to take a baby step instead, thinking maybe it > would be possible to slowly grind away at the problem. > > This series is the first such step. It spreads the use of > block_symbol through a bunch of code, trying to eliminate calls to > symbol::value_address. > > The longer term idea here is to then add an objfile member to > block_symbol. After this, it would be relatively simple to change > symbols to be relocated at point of use. (This would be a significant > step toward objfile splitting, but there's even more to do after > that...) > > Regression tested on x86-64 Fedora 38. > > --- > Changes in v2: > - Updated per review > - Added bound_symbol patch, converted some patches to use it > - More comprehensive change in ada-lang.c > - Link to v1: https://inbox.sourceware.org/gdb-patches/20231029-split-objfile-2023-bound-sym-october-v1-0-612531df2734@tromey.com > > --- > Tom Tromey (31): > Introduce block-symbol.h > Add block_symbol::address > Add bound_symbol > Easy conversions to use block_symbol::address > Use block_symbol::address in ada-tasks.c > Use block_symbol::address in printcmd.c > Use bound_symbol::address in tracepoint.c > Use block_symbol::address in tracepoint.c > Use block_symbol::address in ax-gdb.c > Use block_symbol::address in linespec.c > Use block_symbol::address in ada-lang.c > Use bound_symbol::address in symmisc.c > Introduce read_var_value overload > Use read_var_value in gdb/compile > Return a block_symbol from find_pc_sect_function > Use read_var_value overload in finish_command_fsm > Use block_symbol in overload-handling code > Change evaluate_var_value to accept a block_symbol > Change value_of_variable to take a block_symbol > Return a block_symbol from get_frame_function > Use read_var_value overload in return_command > Use read_var_value overload in py-finishbreakpoint.c > Use read_var_value overload in py-framefilter.c > Use read_var_value overload in Guile > Use read_var_value in read_frame_arg and read_frame_local > Change print_variable_and_value to take a block_symbol > Change find_frame_funname to return a block_symbol > Change btrace_function::sym to a block_symbol > Use read_var_value overload in Python > Remove the old read_var_value > Change language_defn::read_var_value to accept block_symbol > > gdb/ada-lang.c | 116 +++++++++++++---------------- > gdb/ada-tasks.c | 19 ++--- > gdb/ax-gdb.c | 28 +++---- > gdb/ax-gdb.h | 2 +- > gdb/block-symbol.h | 42 +++++++++++ > gdb/blockframe.c | 18 ++--- > gdb/breakpoint.c | 4 +- > gdb/btrace.c | 38 +++++----- > gdb/btrace.h | 5 +- > gdb/cli/cli-cmds.c | 4 +- > gdb/compile/compile-c-symbols.c | 18 +++-- > gdb/compile/compile-cplus-symbols.c | 6 +- > gdb/compile/compile-cplus-types.c | 2 +- > gdb/compile/compile-loc2c.c | 14 ++-- > gdb/compile/compile.h | 6 +- > gdb/cp-support.c | 46 +++++++----- > gdb/cp-support.h | 6 +- > gdb/dwarf2/ada-imported.c | 2 +- > gdb/dwarf2/loc.c | 16 ++-- > gdb/dwarf2/loc.h | 3 +- > gdb/eval.c | 62 +++++++--------- > gdb/expop.h | 5 ++ > gdb/f-valprint.c | 4 +- > gdb/findvar.c | 24 +++--- > gdb/frame.c | 2 +- > gdb/frame.h | 9 ++- > gdb/guile/guile-internal.h | 2 +- > gdb/guile/scm-block.c | 6 +- > gdb/guile/scm-frame.c | 7 +- > gdb/guile/scm-symbol.c | 78 ++++++++++---------- > gdb/infcall.c | 4 +- > gdb/infcmd.c | 29 ++++---- > gdb/infrun.c | 10 +-- > gdb/inline-frame.c | 2 +- > gdb/language.h | 14 +--- > gdb/linespec.c | 15 ++-- > gdb/mi/mi-cmd-stack.c | 20 ++--- > gdb/printcmd.c | 22 +++--- > gdb/python/py-block.c | 6 +- > gdb/python/py-finishbreakpoint.c | 11 +-- > gdb/python/py-frame.c | 15 ++-- > gdb/python/py-framefilter.c | 64 +++++++--------- > gdb/python/py-objfile.c | 16 ++-- > gdb/python/py-record-btrace.c | 2 +- > gdb/python/py-symbol.c | 143 ++++++++++++++++++------------------ > gdb/python/py-type.c | 2 +- > gdb/python/py-unwind.c | 4 +- > gdb/python/python-internal.h | 4 +- > gdb/record-btrace.c | 8 +- > gdb/rust-lang.c | 2 +- > gdb/skip.c | 2 +- > gdb/solib-frv.c | 2 +- > gdb/sparc-tdep.c | 4 +- > gdb/stack.c | 59 ++++++++------- > gdb/stack.h | 2 +- > gdb/symmisc.c | 15 ++-- > gdb/symtab.c | 4 +- > gdb/symtab.h | 38 +++++++--- > gdb/tracepoint.c | 26 ++++--- > gdb/tracepoint.h | 2 +- > gdb/valarith.c | 9 +-- > gdb/valops.c | 75 ++++++++++--------- > gdb/value.c | 2 +- > gdb/value.h | 18 ++--- > 64 files changed, 647 insertions(+), 598 deletions(-) > --- > base-commit: 0a845aef62b8813275616bd399e8fca679161cfc > change-id: 20231029-split-objfile-2023-bound-sym-october-8da7ff1061cc > > Best regards, > -- > Tom Tromey