From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ngGRH+7fDWKOUgAAWB0awg (envelope-from ) for ; Thu, 17 Feb 2022 00:41:02 -0500 Received: by simark.ca (Postfix, from userid 112) id 5EF601F3C9; Thu, 17 Feb 2022 00:41:02 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 81DF51EE1A for ; Thu, 17 Feb 2022 00:40:59 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE5DE3857823 for ; Thu, 17 Feb 2022 05:40:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE5DE3857823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1645076458; bh=4g5L9odqLJideLNHKbhWxrgV4v7o1ab/rsHlEWvdARc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=HC2mmx9aPMjTllwEMW9gKj+T4TGTNBqF5FIernbn5xrsUuLCZGzQVJyqCNpIOgGKX Fa0orcE2Qp8lQeAJVx60rAwFSSjLGw+qewnr19I551ahbyYX3rnPLpu/JQWG8tLhiH HyDHx0+oKUIjsf3HgimWhCiq9Xsy2wtfA2g0qwW8= Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 4C55D3858D20 for ; Thu, 17 Feb 2022 05:40:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C55D3858D20 Received: by smtp.gentoo.org (Postfix, from userid 559) id E3220343136; Thu, 17 Feb 2022 05:40:36 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] sim: gdbinit: hoist setup to common code Date: Thu, 17 Feb 2022 00:40:35 -0500 Message-Id: <20220217054035.10127-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: hp@axis.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This was left in subdirs because of the dynamic cgen usage. However, we can move this breakpoint call to runtime and let gdb detect whether the symbol exists. --- sim/Makefile.in | 4 +++- sim/bpf/configure | 9 --------- sim/common/Make-common.in | 7 ++----- sim/configure | 3 ++- sim/configure.ac | 2 +- sim/{common => }/gdbinit.in | 4 +++- sim/m4/sim_ac_output.m4 | 7 ------- sim/mips/configure | 9 --------- sim/mn10300/configure | 9 --------- sim/or1k/configure | 9 --------- sim/riscv/configure | 9 --------- sim/v850/configure | 9 --------- 12 files changed, 11 insertions(+), 70 deletions(-) rename sim/{common => }/gdbinit.in (60%) diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 57b45a7b4271..74e5dad30498 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -250,7 +250,7 @@ RUNTESTFLAGS = callback_h = $(srcroot)/include/sim/callback.h remote_sim_h = $(srcroot)/include/sim/sim.h -all: libsim.a run$(EXEEXT) .gdbinit +all: libsim.a run$(EXEEXT) libsim.a: $(LIB_OBJS) $(SILENCE) rm -f libsim.a @@ -504,7 +504,7 @@ mostlyclean clean: $(SIM_EXTRA_CLEAN) distclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN) rm -f TAGS - rm -f Makefile config.cache config.log config.status .gdbinit + rm -f Makefile config.cache config.log config.status .c.o: $(COMPILE) $< @@ -521,9 +521,6 @@ Makefile: Makefile.in $(srccom)/Make-common.in $(config.status) @SIM_COMMON_BUILD_FALSE@config.status: configure @SIM_COMMON_BUILD_FALSE@ $(ECHO_GEN) $(SHELL) ./config.status --recheck -.gdbinit: # config.status $(srccom)/gdbinit.in -@SIM_COMMON_BUILD_FALSE@ $(ECHO_GEN) CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status - # CGEN support diff --git a/sim/configure.ac b/sim/configure.ac index 0c14b1da79e2..40a1efb96d33 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -187,5 +187,5 @@ dnl Some arches have unique configure flags. m4_include([frv/acinclude.m4]) m4_include([rx/acinclude.m4]) -AC_CONFIG_FILES([arch-subdir.mk Makefile]) +AC_CONFIG_FILES([arch-subdir.mk Makefile .gdbinit:gdbinit.in]) AC_OUTPUT diff --git a/sim/common/gdbinit.in b/sim/gdbinit.in similarity index 60% rename from sim/common/gdbinit.in rename to sim/gdbinit.in index ab9d7b3d5481..f9cd5f32d2f4 100644 --- a/sim/common/gdbinit.in +++ b/sim/gdbinit.in @@ -1,6 +1,8 @@ break sim_io_error break sim_core_signal -@cgen_breaks@ +# This symbol won't exist for non-cgen ports, but shouldn't be a big deal +# (other than gdb showing a warning on startup). +break cgen_rtx_error define dump set sim_debug_dump () diff --git a/sim/m4/sim_ac_output.m4 b/sim/m4/sim_ac_output.m4 index 22888bf214cf..9eaeeff99f28 100644 --- a/sim/m4/sim_ac_output.m4 +++ b/sim/m4/sim_ac_output.m4 @@ -21,15 +21,8 @@ dnl one afterwards. The two pieces of the common fragment are inserted into dnl the target's fragment at the appropriate points. AC_DEFUN([SIM_AC_OUTPUT], [dnl -dnl Make @cgen_breaks@ non-null only if the sim uses CGEN. -cgen_breaks="" -if grep CGEN_MAINT $srcdir/Makefile.in >/dev/null; then -cgen_breaks="break cgen_rtx_error"; -fi -AC_SUBST(cgen_breaks) AC_CONFIG_FILES(Makefile.sim:Makefile.in) AC_CONFIG_FILES(Make-common.sim:../common/Make-common.in) -AC_CONFIG_FILES(.gdbinit:../common/gdbinit.in) AC_CONFIG_COMMANDS([Makefile], [echo "Merging Makefile.sim+Make-common.sim into Makefile ..." rm -f Makesim1.tmp Makesim2.tmp Makefile -- 2.34.1