Bug 651232

Summary: Use --with-system-gdbinit
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: jan.kratochvil, pmuldoon, sergiodj, spoyarek
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: gdb-7.2.50.20101117-4.fc15 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-27 04:53:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 665799    

Description Jan Kratochvil 2010-11-09 02:29:44 UTC
There is currently no system-wide /etc/gdbinit.
Create one (`/etc/gdbrc' ?).
Try to provide also `/etc/gdbrc.d', if possible with GDB canned commands.

Comment 1 Jan Kratochvil 2010-12-27 04:53:14 UTC
/etc/gdbinit:
# System-wide GDB initialization file.

# FIXME: provide a wildcard.
source /etc/gdbinit.d/gdb-heap.py


Debian uses:
/etc/gdb/gdbinit

Comment 2 Michal Jaegermann 2010-12-28 17:46:05 UTC
(In reply to comment #0)
> There is currently no system-wide /etc/gdbinit.

It indeed showed up in gdb-7.2.50.20101117-4.fc15 with a content like in comment #1.  Only there is no /etc/gdbinit.d/gdb-heap.py so this is not doing very much. Is this really intended that way?

Comment 3 Jan Kratochvil 2010-12-28 18:01:57 UTC
Yes, it is.  If there isn't the comment
  FIXME: provide a wildcard.
there could be instead the correct way:
  source /etc/gdbinit.d/*
like
  -c /etc/prelink.conf.d/*.conf
exists in /etc/prelink.conf and other similar files.

/etc/gdbinit.d/gdb-heap.py is not a problem as gdbinit is run in non-interactive (from_tty == 0) mode and thus any errors reading it are ignored.

One day I can implement wildcards for `source' but so far at least the 3rd party packages can be packaged correctly (with proper explicit entry for each of them).