X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=gXWtE6c/CAW2CHLf 4Ht5iIrFXRZXqWrQos6i+FfClIzqKwNrBzi+gobIEcH7klSR1NxFwm3nnnT+3UIe hB9oamaSRrk4DwlH9s+nMmM1sKDa0QGn4gc47WrshsTk6esW1NrM2VMah+nQLES9 47igC3uXyLr783Q+KEj/dD40PLQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=zHsbd+K5fVlMWXoTc3vr5z dfElc=; b=uN/dLqj3Hzd3ILeiySEK32KCvtMc0Srabd3gA/hCq1pHEJ1QrMmw+a zb9fzIfZoP13RS9kBfac+f5mWz92zwHxc1OFr2fshzJZPbDNdvjJDgU9D83uxTU8 bvdUFbg6MV6gxK21o7iZJjwaaASK6U7cyauTdlROZVwVmYhMzCERg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HOME, inglis, Spellstaker, spellstaker X-HELO: smtp-out-so.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: Unable to register GDB Pretty Printers permanently. To: cygwin AT cygwin DOT com References: From: Brian Inglis Openpgp: preference=signencrypt Message-ID: Date: Mon, 14 Oct 2019 06:59:18 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 2019-10-14 04:32, Spellstaker wrote: > I recently installed cygwin and the pretty printers for strings and vectors > aren't registered by default like it is in mingw what should I do? Docs > online suggest registering in .gdbinit file in home directory I did put > that in home directory but to no avail I do get pretty printing when I > manually register it tho But it isn't persistent > > OS: Windows 10 > GDB: 8.2.1 > G++: 8.3.0 As documented under "$ info gdb Invoking Startup": "To display the list of init files loaded by gdb at startup, you can use 'gdb --help'." $ gdb --help ... At startup, GDB reads the following init files and executes their commands: For more information, type "help" from within GDB, or consult the GDB manual (available as on-line info or a printed manual). Report bugs to "". You can check the gdb configuration with: $ gdb --configuration This GDB was configured as follows: configure --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --with-auto-load-dir=$debugdir:$datadir/auto-load --with-auto-load-safe-path=$debugdir:$datadir/auto-load --with-expat --with-gdb-datadir=/usr/share/gdb (relocatable) --with-jit-reader-dir=/usr/lib/gdb (relocatable) --without-libunwind-ia64 --with-lzma --with-python=/usr (relocatable) --without-guile --with-separate-debug-dir=/usr/lib/debug (relocatable) --without-babeltrace ("Relocatable" means the directory can be moved with the GDB installation tree, and GDB will still find it.) $ gdb -q -iex 'show auto-load' -iex 'info auto-load' -iex q gdb-scripts: Auto-loading of canned sequences of commands scripts is on. local-gdbinit: Auto-loading of .gdbinit script from current directory is on. python-scripts: Auto-loading of Python scripts is on. safe-path: List of directories from which it is safe to auto-load files is $debugdir:$datadir/auto-load. scripts-directory: List of directories from which to load auto-loaded scripts is $debugdir:$datadir/auto-load. gdb-scripts: No auto-load scripts. local-gdbinit: Local .gdbinit file was not found. python-scripts: No auto-load scripts. $ l /usr/lib/debug/usr/ /usr/share/gdb/ /usr/lib/debug/usr/: bin/ sbin/ /usr/share/gdb/: python/ syscalls/ system-gdbinit/ So it looks as though Cygwin gdb is configured and setup to source only startup scripts from the current directory, but it may need to be or be added as a safe path for that to work; or you create directory /usr/share/gdb/auto-load or symlink that to a directory, and install startup scripts there; or create a gdb alias to define scripts directory/-ies and execute init commands or files of init commands with -iex and -ix: $ alias gdb="/usr/bin/gdb -d "$GDB_SCRIPTS_DIR" -iex "add-auto-load-safe-path $GDB_SCRIPTS_DIR" -ix $HOME/.gdbinit" As you are running test releases, you can provide feedback on this list to the Cygwin GDB maintainer about configuring, adding, or providing startup scripts, where they are available on the web, under what licence, in which project. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple