guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#61486] [PATCH] system: Update skeleton gdbinit.


From: Efraim Flashner
Subject: [bug#61486] [PATCH] system: Update skeleton gdbinit.
Date: Wed, 1 Mar 2023 08:43:09 +0200

On Mon, Feb 27, 2023 at 11:34:39PM +0100, Ludovic Courtès wrote:
> Hi Efraim,
> 
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > * gnu/system/shadow.scm (default-skeleton): Update gdbinit to also
> > search for debug packages in guix-home.
> > (skeleton-directory): Move .gdbinit to .config/gdb/gdbinit.
> 
> [...]
> 
> >  (use-modules (gdb))
> >  (execute (string-append \"set debug-file-directory \"
> >                          (or (getenv \"GDB_DEBUG_FILE_DIRECTORY\")
> > -                            \"~/.guix-profile/lib/debug\")))
> > +                            \"~/.guix-profile/lib/debug\"
> > +                            \"~/.guix-home/profile/lib/debug\")))
> 
> This won’t have the desired effect:
> 
> --8<---------------cut here---------------start------------->8---
> scheme@(guile-user)> (or #f "a" "b")
> $10 = "a"
> --8<---------------cut here---------------end--------------->8---
> 
> Perhaps we should check with ‘file-exists?’ which one to pick, probably
> giving higher precedence to ~/.guix-home/profile since Guix Home users
> might have both (I do).
> 
> > +                       (when (file-exists? ".gdbinit")
> > +                         (mkdir-p ".config/gdb")
> > +                         (rename-file ".gdbinit" ".config/gdb/gdbinit"))
> 
> I couldn’t believe it so I had to check the manual and yes, GDB does
> look for ~/.config/gdb/gdbinit!  Incredible.

Now with a new and improved version 2!

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: v2-0001-system-Update-skeleton-gdbinit.patch
Description: Text document

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]