Permalink
Browse files

set gdb settings before attaching to a pid (so it reads from /usr/lib…

…/debug)
  • Loading branch information...
1 parent 4323183 commit 615199c23ed694022b45b27656e574d1557931d9 @tmm1 committed Feb 22, 2011
Showing with 9 additions and 18 deletions.
  1. +1 −0 bin/gdb.rb
  2. +0 −18 scripts/ruby-gdb.py
  3. +8 −0 scripts/settings.gdb
View
@@ -18,6 +18,7 @@
args = []
args << "#{dir}/ext/dst/bin/gdb"
+args << "-x #{dir}/scripts/settings.gdb"
if pid
args << "-ex 'attach #{pid}'"
else
View
@@ -639,21 +639,3 @@ def invoke (self, arg, from_tty):
RubyObjects.TYPES[int(val,16)] = name[2:].lower()
RubyObjects.ITYPES = dict([[v,k] for k,v in RubyObjects.TYPES.items()])
-
-##
-# Set GDB options
-
-settings = """
- set height 0
- set width 0
- set print pretty
-
- set history save on
- set history filename ~/.gdbrb_history
-
- set debug-file-directory /usr/lib/debug
-""".split("\n")
-
-for s in settings:
- if len(s.strip()) > 0:
- gdb.execute(s)
View
@@ -0,0 +1,8 @@
+set height 0
+set width 0
+set print pretty
+
+set history save on
+set history filename ~/.gdbrb_history
+
+set debug-file-directory /usr/lib/debug

0 comments on commit 615199c

Please sign in to comment.