2018-03-09 16:46:37 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
|
From: Fedora GDB patches <invalid@email.com>
|
|
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
|
Subject: gdb-archer.patch
|
|
|
|
|
|
|
|
;; Python patches of: http://sourceware.org/gdb/wiki/ProjectArcher
|
|
|
|
;;=push
|
|
|
|
|
2009-05-04 16:53:01 +00:00
|
|
|
http://sourceware.org/gdb/wiki/ProjectArcher
|
|
|
|
http://sourceware.org/gdb/wiki/ArcherBranchManagement
|
|
|
|
|
|
|
|
GIT snapshot:
|
2017-05-01 01:04:39 +00:00
|
|
|
commit 718a1618b2f691a7f407213bb50f100ac59f91c3
|
2009-05-04 16:53:01 +00:00
|
|
|
|
2013-09-11 13:42:29 +00:00
|
|
|
tromey/python
|
2009-05-04 16:53:01 +00:00
|
|
|
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in
|
|
|
|
--- a/gdb/data-directory/Makefile.in
|
|
|
|
+++ b/gdb/data-directory/Makefile.in
|
2018-09-11 13:49:10 +00:00
|
|
|
@@ -80,6 +80,7 @@ PYTHON_FILE_LIST = \
|
2016-01-14 17:05:52 +00:00
|
|
|
gdb/unwinder.py \
|
2014-08-11 14:08:48 +00:00
|
|
|
gdb/xmethod.py \
|
2011-03-10 09:18:25 +00:00
|
|
|
gdb/command/__init__.py \
|
|
|
|
+ gdb/command/ignore_errors.py \
|
2017-05-01 01:04:39 +00:00
|
|
|
gdb/command/explore.py \
|
2018-03-09 16:46:37 +00:00
|
|
|
gdb/command/backtrace.py \
|
2013-09-11 13:42:29 +00:00
|
|
|
gdb/command/frame_filters.py \
|
2020-07-23 12:21:48 +00:00
|
|
|
@@ -92,6 +93,7 @@ PYTHON_FILE_LIST = \
|
2017-02-15 16:05:56 +00:00
|
|
|
gdb/function/as_string.py \
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
gdb/function/caller_is.py \
|
2014-12-24 16:27:18 +00:00
|
|
|
gdb/function/strfns.py \
|
2011-03-10 09:18:25 +00:00
|
|
|
+ gdb/function/in_scope.py \
|
2014-12-24 16:27:18 +00:00
|
|
|
gdb/printer/__init__.py \
|
|
|
|
gdb/printer/bound_registers.py
|
2011-03-10 09:18:25 +00:00
|
|
|
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
diff --git a/gdb/gdb-gdb.gdb.in b/gdb/gdb-gdb.gdb.in
|
|
|
|
--- a/gdb/gdb-gdb.gdb.in
|
|
|
|
+++ b/gdb/gdb-gdb.gdb.in
|
2014-08-11 14:08:48 +00:00
|
|
|
@@ -1,5 +1,15 @@
|
|
|
|
echo Setting up the environment for debugging gdb.\n
|
|
|
|
|
|
|
|
+# Set up the Python library and "require" command.
|
|
|
|
+python
|
|
|
|
+from os.path import abspath
|
|
|
|
+gdb.datadir = abspath ('@srcdir@/python/lib')
|
|
|
|
+gdb.pythonlibdir = gdb.datadir
|
|
|
|
+gdb.__path__ = [gdb.datadir + '/gdb']
|
|
|
|
+sys.path.insert(0, gdb.datadir)
|
|
|
|
+end
|
|
|
|
+source @srcdir@/python/lib/gdb/__init__.py
|
2009-08-17 13:40:03 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
if !$gdb_init_done
|
|
|
|
set variable $gdb_init_done = 1
|
2010-04-16 16:29:50 +00:00
|
|
|
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
diff --git a/gdb/python/lib/gdb/command/ignore_errors.py b/gdb/python/lib/gdb/command/ignore_errors.py
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/gdb/python/lib/gdb/command/ignore_errors.py
|
2014-08-11 14:08:48 +00:00
|
|
|
@@ -0,0 +1,37 @@
|
|
|
|
+# Ignore errors in user commands.
|
2009-08-11 16:28:33 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+# Copyright (C) 2008 Free Software Foundation, Inc.
|
2009-05-04 16:53:01 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+# This program is free software; you can redistribute it and/or modify
|
|
|
|
+# it under the terms of the GNU General Public License as published by
|
|
|
|
+# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
+# (at your option) any later version.
|
|
|
|
+#
|
|
|
|
+# This program is distributed in the hope that it will be useful,
|
|
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
+# GNU General Public License for more details.
|
|
|
|
+#
|
|
|
|
+# You should have received a copy of the GNU General Public License
|
|
|
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2009-05-04 16:53:01 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+import gdb
|
2009-05-04 16:53:01 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+class IgnoreErrorsCommand (gdb.Command):
|
|
|
|
+ """Execute a single command, ignoring all errors.
|
|
|
|
+Only one-line commands are supported.
|
|
|
|
+This is primarily useful in scripts."""
|
2009-05-04 16:53:01 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+ def __init__ (self):
|
|
|
|
+ super (IgnoreErrorsCommand, self).__init__ ("ignore-errors",
|
|
|
|
+ gdb.COMMAND_OBSCURE,
|
|
|
|
+ # FIXME...
|
|
|
|
+ gdb.COMPLETE_COMMAND)
|
2009-05-04 16:53:01 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+ def invoke (self, arg, from_tty):
|
|
|
|
+ try:
|
|
|
|
+ gdb.execute (arg, from_tty)
|
|
|
|
+ except:
|
|
|
|
+ pass
|
2009-05-04 16:53:01 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+IgnoreErrorsCommand ()
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
diff --git a/gdb/python/lib/gdb/function/in_scope.py b/gdb/python/lib/gdb/function/in_scope.py
|
|
|
|
new file mode 100644
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/gdb/python/lib/gdb/function/in_scope.py
|
2014-08-11 14:08:48 +00:00
|
|
|
@@ -0,0 +1,47 @@
|
|
|
|
+# In-scope function.
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+# Copyright (C) 2008 Free Software Foundation, Inc.
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
|
|
|
+# This program is free software; you can redistribute it and/or modify
|
|
|
|
+# it under the terms of the GNU General Public License as published by
|
|
|
|
+# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
+# (at your option) any later version.
|
|
|
|
+#
|
|
|
|
+# This program is distributed in the hope that it will be useful,
|
|
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
+# GNU General Public License for more details.
|
|
|
|
+#
|
|
|
|
+# You should have received a copy of the GNU General Public License
|
|
|
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+import gdb
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+class InScope (gdb.Function):
|
|
|
|
+ """Return True if all the given variables or macros are in scope.
|
|
|
|
+Takes one argument for each variable name to be checked."""
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+ def __init__ (self):
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
+ super (InScope, self).__init__ ("in_scope")
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+ def invoke (self, *vars):
|
|
|
|
+ if len (vars) == 0:
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
+ raise (TypeError, "in_scope takes at least one argument")
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+ # gdb.Value isn't hashable so it can't be put in a map.
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
+ # Convert to string first.
|
|
|
|
+ wanted = set (map (lambda x: x.string (), vars))
|
|
|
|
+ found = set ()
|
|
|
|
+ block = gdb.selected_frame ().block ()
|
|
|
|
+ while block:
|
|
|
|
+ for sym in block:
|
|
|
|
+ if (sym.is_argument or sym.is_constant
|
|
|
|
+ or sym.is_function or sym.is_variable):
|
|
|
|
+ if sym.name in wanted:
|
|
|
|
+ found.add (sym.name)
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
+ block = block.superblock
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
+ return wanted == found
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
2014-08-11 14:08:48 +00:00
|
|
|
+InScope ()
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
|
|
|
|
--- a/gdb/testsuite/gdb.python/py-frame.exp
|
|
|
|
+++ b/gdb/testsuite/gdb.python/py-frame.exp
|
|
|
|
@@ -95,6 +95,8 @@ gdb_test "python print ('result = %s' % f0.read_var ('a'))" " = 1" "test Frame.r
|
2012-06-16 04:55:29 +00:00
|
|
|
|
2013-07-08 14:47:04 +00:00
|
|
|
gdb_test "python print ('result = %s' % (gdb.selected_frame () == f1))" " = True" "test gdb.selected_frame"
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
|
2013-07-08 14:47:04 +00:00
|
|
|
+gdb_test "python print ('result = %s' % (f0.block ()))" "<gdb.Block object at 0x\[\[:xdigit:\]\]+>" "test Frame.block"
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
+
|
|
|
|
# Can read SP register.
|
|
|
|
gdb_test "python print ('result = %s' % (gdb.selected_frame ().read_register ('sp') == gdb.parse_and_eval ('\$sp')))" \
|
|
|
|
" = True" \
|
|
|
|
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
|
|
|
|
--- a/gdb/testsuite/gdb.python/py-value.exp
|
|
|
|
+++ b/gdb/testsuite/gdb.python/py-value.exp
|
2020-07-23 12:21:48 +00:00
|
|
|
@@ -419,6 +419,15 @@ proc test_value_after_death {} {
|
2012-06-16 04:55:29 +00:00
|
|
|
"print value's type"
|
|
|
|
}
|
|
|
|
|
|
|
|
+# Regression test for a cast failure. The bug was that if we cast a
|
|
|
|
+# value to its own type, gdb could crash. This happened because we
|
|
|
|
+# could end up double-freeing a struct value.
|
|
|
|
+proc test_cast_regression {} {
|
|
|
|
+ gdb_test "python v = gdb.Value(5)" "" "create value for cast test"
|
|
|
|
+ gdb_test "python v = v.cast(v.type)" "" "cast value for cast test"
|
- Use patchlist.pl to merge with gdb-7.9-10.fc22, a rebase to FSF GDB 7.9.
The GDB 7.8 features are:
* Python Scripting
- You can now access frame registers from Python scripts.
- New attribute 'producer' for gdb.Symtab objects.
* New Python-based convenience functions:
- $_caller_is(name [, number_of_frames])
- $_caller_matches(regexp [, number_of_frames])
- $_any_caller_is(name [, number_of_frames])
- $_any_caller_matches(regexp [, number_of_frames])
* New commands
- queue-signal signal-name-or-number
Queue a signal to be delivered to the thread when it is resumed.
* On resume, GDB now always passes the signal the program had stopped
for to the thread the signal was sent to, even if the user changed
threads before resuming. Previously GDB would often (but not
always) deliver the signal to the thread that happens to be current
at resume time.
* Conversely, the "signal" command now consistently delivers the
requested signal to the current thread. GDB now asks for
confirmation if the program had stopped for a signal and the user
switched threads meanwhile.
* "breakpoint always-inserted" modes "off" and "auto" merged.
Now, when 'breakpoint always-inserted mode' is set to "off", GDB
won't remove breakpoints from the target until all threads stop,
even in non-stop mode. The "auto" mode has been removed, and "off"
is now the default mode.
* MI changes
- The -list-thread-groups command outputs an exit-code field for
inferiors that have exited.
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=115
2015-02-25 13:45:10 +00:00
|
|
|
+ gdb_test "python print(v)" "5" "print value for cast test"
|
2012-06-16 04:55:29 +00:00
|
|
|
+}
|
2011-08-11 13:47:36 +00:00
|
|
|
+
|
2012-06-16 04:55:29 +00:00
|
|
|
# Regression test for invalid subscript operations. The bug was that
|
|
|
|
# the type of the value was not being checked before allowing a
|
|
|
|
# subscript operation to proceed.
|
2020-07-23 12:21:48 +00:00
|
|
|
@@ -606,6 +615,7 @@ test_value_in_inferior
|
2019-05-24 13:40:33 +00:00
|
|
|
test_value_from_buffer
|
2012-06-16 04:55:29 +00:00
|
|
|
test_inferior_function_call
|
|
|
|
test_value_after_death
|
|
|
|
+test_cast_regression
|
|
|
|
|
|
|
|
# Test either C or C++ values.
|
2014-02-10 17:10:42 +00:00
|
|
|
|