Skip to content

Commit cb92592

Browse files
author
Git for Windows Build Agent
committed
Update 1 package
mingw-w64-i686-gdb (16.3-1 -> 17.1-1) Signed-off-by: Git for Windows Build Agent <[email protected]>
1 parent 12881e2 commit cb92592

File tree

111 files changed

+646
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+646
-385
lines changed

mingw32/bin/gdb-add-index

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Add a .gdb_index section to a file.
44

5-
# Copyright (C) 2010-2024 Free Software Foundation, Inc.
5+
# Copyright (C) 2010-2025 Free Software Foundation, Inc.
66
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
88
# the Free Software Foundation; either version 3 of the License, or
@@ -22,16 +22,73 @@ GDB=${GDB:=gdb}
2222
OBJCOPY=${OBJCOPY:=objcopy}
2323
READELF=${READELF:=readelf}
2424

25+
PKGVERSION="(GDB) "
26+
VERSION="17.1"
27+
2528
myname="${0##*/}"
2629

30+
print_usage() {
31+
prefix="Usage: $myname"
32+
echo "$prefix [-h|--help] [-v|--version] [--dwarf-5] FILENAME"
33+
}
34+
35+
print_try_help() {
36+
echo "Try '$myname --help' for more information."
37+
}
38+
39+
print_help() {
40+
print_usage
41+
echo
42+
echo "Add a .gdb_index section to FILENAME to facilitate faster debug"
43+
echo "information loading by GDB."
44+
echo
45+
echo " -h, --help Print this message then exit."
46+
echo " -v, --version Print version information then exit."
47+
echo " --dwarf-5 Add the DWARF-5 style .debug_names section"
48+
echo " instead of .gdb_index."
49+
}
50+
51+
print_version() {
52+
echo "GNU gdb-add-index (${PKGVERSION}) ${VERSION}"
53+
}
54+
2755
dwarf5=""
28-
if [ "$1" = "-dwarf-5" ]; then
29-
dwarf5="$1"
56+
57+
# Parse options.
58+
until
59+
opt=$1
60+
case ${opt} in
61+
--dwarf-5 | -dwarf-5)
62+
dwarf5="-dwarf-5"
63+
;;
64+
65+
--help | -help | -h)
66+
print_help
67+
exit 0
68+
;;
69+
70+
--version | -version | -v)
71+
print_version
72+
exit 0
73+
;;
74+
75+
-?*)
76+
print_try_help 1>&2
77+
exit 2
78+
;;
79+
80+
*)
81+
# No arguments remaining.
82+
;;
83+
esac
84+
# Break from loop if the first character of OPT is not '-'.
85+
[ "x$(printf %.1s "$opt")" != "x-" ]
86+
do
3087
shift
31-
fi
88+
done
3289

3390
if test $# != 1; then
34-
echo "usage: $myname [-dwarf-5] FILE" 1>&2
91+
print_try_help
3592
exit 1
3693
fi
3794

mingw32/bin/gdb.exe

304 KB
Binary file not shown.

mingw32/bin/gdbserver.exe

16.7 KB
Binary file not shown.

mingw32/bin/gstack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ GDB=${GDB:-$(command -v gdb)}
2323
GDBARGS=${GDBARGS:-}
2424
AWK=${AWK:-}
2525
PKGVERSION="(GDB) "
26-
VERSION="16.3"
26+
VERSION="17.1"
2727

2828
# Find an appropriate awk interpreter if one was not specified
2929
# via the environment.

mingw32/include/gdb/jit-reader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* JIT declarations for GDB, the GNU Debugger.
22
3-
Copyright (C) 2011-2024 Free Software Foundation, Inc.
3+
Copyright (C) 2011-2025 Free Software Foundation, Inc.
44
55
This file is part of GDB.
66

mingw32/share/gdb/python/gdb/FrameDecorator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2013-2024 Free Software Foundation, Inc.
1+
# Copyright (C) 2013-2025 Free Software Foundation, Inc.
22

33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -174,7 +174,7 @@ class FrameDecorator(_FrameDecoratorBase):
174174
sub-classed from FrameDecorator. If Decorator1 just overrides the
175175
'function' method, then all of the other methods are carried out
176176
by the super-class FrameDecorator. But Decorator2 may have
177-
overriden other methods, so FrameDecorator will look at the
177+
overridden other methods, so FrameDecorator will look at the
178178
'base' parameter and defer to that class's methods. And so on,
179179
down the chain."""
180180

mingw32/share/gdb/python/gdb/FrameIterator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2013-2024 Free Software Foundation, Inc.
1+
# Copyright (C) 2013-2025 Free Software Foundation, Inc.
22

33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by

mingw32/share/gdb/python/gdb/__init__.py

Lines changed: 139 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2010-2024 Free Software Foundation, Inc.
1+
# Copyright (C) 2010-2025 Free Software Foundation, Inc.
22

33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -19,17 +19,22 @@
1919
import threading
2020
import traceback
2121
from contextlib import contextmanager
22+
from importlib import reload
2223

23-
# Python 3 moved "reload"
24-
if sys.version_info >= (3, 4):
25-
from importlib import reload
26-
else:
27-
from imp import reload
28-
29-
import _gdb
30-
24+
# The star import imports _gdb names. When the names are used locally, they
25+
# trigger F405 warnings unless added to the explicit import list.
3126
# Note that two indicators are needed here to silence flake8.
3227
from _gdb import * # noqa: F401,F403
28+
from _gdb import (
29+
STDERR,
30+
STDOUT,
31+
Command,
32+
execute,
33+
flush,
34+
parameter,
35+
selected_inferior,
36+
write,
37+
)
3338

3439
# isort: split
3540

@@ -60,14 +65,14 @@ def writelines(self, iterable):
6065
self.write(line)
6166

6267
def flush(self):
63-
_gdb.flush(stream=self.stream)
68+
flush(stream=self.stream)
6469

6570
def write(self, s):
66-
_gdb.write(s, stream=self.stream)
71+
write(s, stream=self.stream)
6772

6873

69-
sys.stdout = _GdbFile(_gdb.STDOUT)
70-
sys.stderr = _GdbFile(_gdb.STDERR)
74+
sys.stdout = _GdbFile(STDOUT)
75+
sys.stderr = _GdbFile(STDERR)
7176

7277
# Default prompt hook does nothing.
7378
prompt_hook = None
@@ -189,7 +194,7 @@ def GdbSetPythonDirectory(dir):
189194

190195
def current_progspace():
191196
"Return the current Progspace."
192-
return _gdb.selected_inferior().progspace
197+
return selected_inferior().progspace
193198

194199

195200
def objfiles():
@@ -226,14 +231,14 @@ def set_parameter(name, value):
226231
value = "on"
227232
else:
228233
value = "off"
229-
_gdb.execute("set " + name + " " + str(value), to_string=True)
234+
execute("set " + name + " " + str(value), to_string=True)
230235

231236

232237
@contextmanager
233238
def with_parameter(name, value):
234239
"""Temporarily set the GDB parameter NAME to VALUE.
235240
Note that this is a context manager."""
236-
old_value = _gdb.parameter(name)
241+
old_value = parameter(name)
237242
set_parameter(name, value)
238243
try:
239244
# Nothing that useful to return.
@@ -392,3 +397,121 @@ def _handle_missing_objfile(pspace, buildid, filename):
392397
return _handle_missing_files(
393398
pspace, "objfile", lambda h: h(pspace, buildid, filename)
394399
)
400+
401+
402+
class ParameterPrefix:
403+
# A wrapper around gdb.Command for creating set/show prefixes.
404+
#
405+
# When creating a gdb.Parameter sub-classes, it is sometimes necessary
406+
# to first create a gdb.Command object in order to create the needed
407+
# command prefix. However, for parameters, we actually need two
408+
# prefixes, a 'set' prefix, and a 'show' prefix. With this helper
409+
# class, a single instance of this class will create both prefixes at
410+
# once.
411+
#
412+
# It is important that this class-level documentation not be a __doc__
413+
# string. Users are expected to sub-class this ParameterPrefix class
414+
# and add their own documentation. If they don't, then GDB will
415+
# generate a suitable doc string. But, if this (parent) class has a
416+
# __doc__ string of its own, then sub-classes will inherit that __doc__
417+
# string, and GDB will not understand that it needs to generate one.
418+
419+
class _PrefixCommand(Command):
420+
"""A gdb.Command used to implement both the set and show prefixes.
421+
422+
This documentation string is not used as the prefix command
423+
documentation as it is overridden in the __init__ method below."""
424+
425+
# This private method is connected to the 'invoke' attribute within
426+
# this _PrefixCommand object if the containing ParameterPrefix
427+
# object has an invoke_set or invoke_show method.
428+
#
429+
# This method records within self.__delegate which _PrefixCommand
430+
# object is currently active, and then calls the correct invoke
431+
# method on the delegat object (the ParameterPrefix sub-class
432+
# object).
433+
#
434+
# Recording the currently active _PrefixCommand object is important;
435+
# if from the invoke method the user calls dont_repeat, then this is
436+
# forwarded to the currently active _PrefixCommand object.
437+
def __invoke(self, args, from_tty):
438+
439+
# A helper class for use as part of a Python 'with' block.
440+
# Records which gdb.Command object is currently running its
441+
# invoke method.
442+
class MarkActiveCallback:
443+
# The CMD is a _PrefixCommand object, and the DELEGATE is
444+
# the ParameterPrefix class, or sub-class object. At this
445+
# point we simple record both of these within the
446+
# MarkActiveCallback object.
447+
def __init__(self, cmd, delegate):
448+
self.__cmd = cmd
449+
self.__delegate = delegate
450+
451+
# Record the currently active _PrefixCommand object within
452+
# the outer ParameterPrefix sub-class object.
453+
def __enter__(self):
454+
self.__delegate.active_prefix = self.__cmd
455+
456+
# Once the invoke method has completed, then clear the
457+
# _PrefixCommand object that was stored into the outer
458+
# ParameterPrefix sub-class object.
459+
def __exit__(self, exception_type, exception_value, traceback):
460+
self.__delegate.active_prefix = None
461+
462+
# The self.__cb attribute is set when the _PrefixCommand object
463+
# is created, and is either invoke_set or invoke_show within the
464+
# ParameterPrefix sub-class object.
465+
assert callable(self.__cb)
466+
467+
# Record the currently active _PrefixCommand object within the
468+
# ParameterPrefix sub-class object, then call the relevant
469+
# invoke method within the ParameterPrefix sub-class object.
470+
with MarkActiveCallback(self, self.__delegate):
471+
self.__cb(args, from_tty)
472+
473+
@staticmethod
474+
def __find_callback(delegate, mode):
475+
"""The MODE is either 'set' or 'show'. Look for an invoke_MODE method
476+
on DELEGATE, if a suitable method is found, then return it, otherwise,
477+
return None.
478+
"""
479+
cb = getattr(delegate, "invoke_" + mode, None)
480+
if callable(cb):
481+
return cb
482+
return None
483+
484+
def __init__(self, mode, name, cmd_class, delegate, doc=None):
485+
"""Setup this gdb.Command. Mode is a string, either 'set' or 'show'.
486+
NAME is the name for this prefix command, that is, the
487+
words that appear after both 'set' and 'show' in the
488+
command name. CMD_CLASS is the usual enum. And DELEGATE
489+
is the gdb.ParameterPrefix object this prefix is part of.
490+
"""
491+
assert mode == "set" or mode == "show"
492+
if doc is None:
493+
self.__doc__ = delegate.__doc__
494+
else:
495+
self.__doc__ = doc
496+
self.__cb = self.__find_callback(delegate, mode)
497+
self.__delegate = delegate
498+
if self.__cb is not None:
499+
self.invoke = self.__invoke
500+
super().__init__(mode + " " + name, cmd_class, prefix=True)
501+
502+
def __init__(self, name, cmd_class, doc=None):
503+
"""Create a _PrefixCommand for both the set and show prefix commands.
504+
NAME is the command name without either the leading 'set ' or
505+
'show ' strings, and CMD_CLASS is the usual enum value.
506+
"""
507+
self.active_prefix = None
508+
self._set_prefix_cmd = self._PrefixCommand("set", name, cmd_class, self, doc)
509+
self._show_prefix_cmd = self._PrefixCommand("show", name, cmd_class, self, doc)
510+
511+
# When called from within an invoke method the self.active_prefix
512+
# attribute should be set to a gdb.Command sub-class (a _PrefixCommand
513+
# object, see above). Forward the dont_repeat call to this object to
514+
# register the actual command as none repeating.
515+
def dont_repeat(self):
516+
if self.active_prefix is not None:
517+
self.active_prefix.dont_repeat()

mingw32/share/gdb/python/gdb/command/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2010-2024 Free Software Foundation, Inc.
1+
# Copyright (C) 2010-2025 Free Software Foundation, Inc.
22

33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by

mingw32/share/gdb/python/gdb/command/explore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# GDB 'explore' command.
2-
# Copyright (C) 2012-2024 Free Software Foundation, Inc.
2+
# Copyright (C) 2012-2025 Free Software Foundation, Inc.
33

44
# This program is free software; you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

0 commit comments

Comments
 (0)