From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 415623857C6A; Fri, 10 Sep 2021 14:50:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 415623857C6A From: "patrickdepinguin at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/28330] gdbinit file should be loaded before core file Date: Fri, 10 Sep 2021 14:50:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: patrickdepinguin at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2021 14:50:51 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28330 Thomas De Schampheleire changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #2 from Thomas De Schampheleire --- (In reply to Simon Marchi from comment #1) > I'm a bit confused, because you talk about files loaded using -x, but your > example doesn't show any -x passed to gdb. Are you talking about files > loaded using -x, or gdbinit files loaded automatically, such as the one in > $HOME/.gdbinit? >=20 > If you are talking about -x, then there exists both -ix and -eix that can= be > used to load files earlier in the startup process, maybe that can help. Sorry for the confusion. In the example, `cross-gdb` is actually a wrapper around the real gdb binar= y, passing one or more `-x path-to-gdbinit` options. I had tried '-ix' / '--init-command' before, but must have drawn an incorre= ct conclusion, because now I tried it again and indeed it works. Moreover, when using '-x', I now notice that the error about auto-load-safe-path can actually be solved by _first_ setting the auto-load-safe-path, and _then_ setting the sysroot. When using '-ix' this order no longer matters. So, problem solved, thanks a lot, and sorry for the noise. --=20 You are receiving this mail because: You are on the CC list for the bug.=