Skip to content

Commit

Permalink
Update 3 packages
Browse files Browse the repository at this point in the history
mingw-w64-i686-gdb (14.2-1 -> 15.1-1)
mingw-w64-x86_64-gdb (14.2-1 -> 15.1-1)
python (3.12.4-4 -> 3.12.4-6)

Signed-off-by: Git for Windows Build Agent <[email protected]>
  • Loading branch information
Git for Windows Build Agent committed Jul 9, 2024
1 parent d8e5522 commit f168a41
Show file tree
Hide file tree
Showing 272 changed files with 12,101 additions and 4,096 deletions.
2 changes: 1 addition & 1 deletion mingw32/bin/gdb-add-index
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Add a .gdb_index section to a file.

# Copyright (C) 2010-2023 Free Software Foundation, Inc.
# Copyright (C) 2010-2024 Free Software Foundation, Inc.
# 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
Expand Down
Binary file modified mingw32/bin/gdb.exe
Binary file not shown.
Binary file modified mingw32/bin/gdbserver.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion mingw32/include/gdb/jit-reader.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* JIT declarations for GDB, the GNU Debugger.
Copyright (C) 2011-2023 Free Software Foundation, Inc.
Copyright (C) 2011-2024 Free Software Foundation, Inc.
This file is part of GDB.
Expand Down
3 changes: 1 addition & 2 deletions mingw32/share/gdb/python/gdb/FrameDecorator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2013-2023 Free Software Foundation, Inc.
# Copyright (C) 2013-2024 Free Software Foundation, Inc.

# 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
Expand Down Expand Up @@ -251,7 +251,6 @@ def symbol(self):


class FrameVars(object):

"""Utility class to fetch and store frame local variables, or
frame arguments."""

Expand Down
2 changes: 1 addition & 1 deletion mingw32/share/gdb/python/gdb/FrameIterator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2013-2023 Free Software Foundation, Inc.
# Copyright (C) 2013-2024 Free Software Foundation, Inc.

# 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
Expand Down
99 changes: 58 additions & 41 deletions mingw32/share/gdb/python/gdb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 Free Software Foundation, Inc.
# Copyright (C) 2010-2024 Free Software Foundation, Inc.

# 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
Expand All @@ -13,12 +13,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import os
import signal
import sys
import threading
import traceback
import os
import sys
import _gdb
from contextlib import contextmanager

# Python 3 moved "reload"
Expand All @@ -27,7 +26,12 @@
else:
from imp import reload

from _gdb import *
import _gdb

# Note that two indicators are needed here to silence flake8.
from _gdb import * # noqa: F401,F403

# isort: split

# Historically, gdb.events was always available, so ensure it's
# still available without an explicit import.
Expand Down Expand Up @@ -56,15 +60,14 @@ def writelines(self, iterable):
self.write(line)

def flush(self):
flush(stream=self.stream)
_gdb.flush(stream=self.stream)

def write(self, s):
write(s, stream=self.stream)

_gdb.write(s, stream=self.stream)

sys.stdout = _GdbFile(STDOUT)

sys.stderr = _GdbFile(STDERR)
sys.stdout = _GdbFile(_gdb.STDOUT)
sys.stderr = _GdbFile(_gdb.STDERR)

# Default prompt hook does nothing.
prompt_hook = None
Expand All @@ -84,6 +87,8 @@ def write(self, s):
frame_filters = {}
# Initial frame unwinders.
frame_unwinders = []
# Initial missing debug handlers.
missing_debug_handlers = []


def _execute_unwinders(pending_frame):
Expand Down Expand Up @@ -125,33 +130,6 @@ def _execute_unwinders(pending_frame):
return None


def _execute_file(filepath):
"""This function is used to replace Python 2's PyRun_SimpleFile.
Loads and executes the given file.
We could use the runpy module, but its documentation says:
"Furthermore, any functions and classes defined by the executed code are
not guaranteed to work correctly after a runpy function has returned."
"""
globals = sys.modules["__main__"].__dict__
set_file = False
# Set file (if not set) so that the imported file can use it (e.g. to
# access file-relative paths). This matches what PyRun_SimpleFile does.
if not hasattr(globals, "__file__"):
globals["__file__"] = filepath
set_file = True
try:
with open(filepath, "rb") as file:
# We pass globals also as locals to match what Python does
# in PyRun_SimpleFile.
compiled = compile(file.read(), filepath, "exec")
exec(compiled, globals, globals)
finally:
if set_file:
del globals["__file__"]


# Convenience variable to GDB's python directory
PYTHONDIR = os.path.dirname(os.path.dirname(__file__))

Expand Down Expand Up @@ -183,7 +161,7 @@ def _auto_load_packages():
reload(__import__(modname))
else:
__import__(modname)
except:
except Exception:
sys.stderr.write(traceback.format_exc() + "\n")


Expand All @@ -210,7 +188,7 @@ def GdbSetPythonDirectory(dir):

def current_progspace():
"Return the current Progspace."
return selected_inferior().progspace
return _gdb.selected_inferior().progspace


def objfiles():
Expand Down Expand Up @@ -247,14 +225,14 @@ def set_parameter(name, value):
value = "on"
else:
value = "off"
execute("set " + name + " " + str(value), to_string=True)
_gdb.execute("set " + name + " " + str(value), to_string=True)


@contextmanager
def with_parameter(name, value):
"""Temporarily set the GDB parameter NAME to VALUE.
Note that this is a context manager."""
old_value = parameter(name)
old_value = _gdb.parameter(name)
set_parameter(name, value)
try:
# Nothing that useful to return.
Expand Down Expand Up @@ -291,3 +269,42 @@ def start(self):
# threads.
with blocked_signals():
super().start()


def _handle_missing_debuginfo(objfile):
"""Internal function called from GDB to execute missing debug
handlers.
Run each of the currently registered, and enabled missing debug
handler objects for the current program space and then from the
global list. Stop after the first handler that returns a result
other than None.
Arguments:
objfile: A gdb.Objfile for which GDB could not find any debug
information.
Returns:
None: No debug information could be found for objfile.
False: A handler has done all it can with objfile, but no
debug information could be found.
True: Debug information might have been installed by a
handler, GDB should check again.
A string: This is the filename of a file containing the
required debug information.
"""
pspace = objfile.progspace

for handler in pspace.missing_debug_handlers:
if handler.enabled:
result = handler(objfile)
if result is not None:
return result

for handler in missing_debug_handlers:
if handler.enabled:
result = handler(objfile)
if result is not None:
return result

return None
2 changes: 1 addition & 1 deletion mingw32/share/gdb/python/gdb/command/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2010-2023 Free Software Foundation, Inc.
# Copyright (C) 2010-2024 Free Software Foundation, Inc.

# 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
Expand Down
2 changes: 1 addition & 1 deletion mingw32/share/gdb/python/gdb/command/explore.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GDB 'explore' command.
# Copyright (C) 2012-2023 Free Software Foundation, Inc.
# Copyright (C) 2012-2024 Free Software Foundation, Inc.

# 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
Expand Down
28 changes: 12 additions & 16 deletions mingw32/share/gdb/python/gdb/command/frame_filters.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Frame-filter commands.
# Copyright (C) 2013-2023 Free Software Foundation, Inc.
# Copyright (C) 2013-2024 Free Software Foundation, Inc.

# 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
Expand All @@ -17,6 +17,7 @@
"""GDB commands for working with frame-filters."""

import sys

import gdb
import gdb.frames

Expand Down Expand Up @@ -445,7 +446,7 @@ def complete(self, text, word):
if text.count(" ") == 0:
return _complete_frame_filter_list(text, word, False)
else:
printer_list = frame._return_list(text.split()[0].rstrip())
printer_list = gdb.frames.return_list(text.split()[0].rstrip())
return _complete_frame_filter_name(word, printer_list)

def invoke(self, arg, from_tty):
Expand All @@ -454,20 +455,15 @@ def invoke(self, arg, from_tty):
return
filter_name = command_tuple[1]
list_name = command_tuple[0]
try:
priority = self.get_filter_priority(list_name, filter_name)
except Exception:
e = sys.exc_info()[1]
print("Error printing filter priority for '" + name + "':" + str(e))
else:
print(
"Priority of filter '"
+ filter_name
+ "' in list '"
+ list_name
+ "' is: "
+ str(priority)
)
priority = self.get_filter_priority(list_name, filter_name)
print(
"Priority of filter '"
+ filter_name
+ "' in list '"
+ list_name
+ "' is: "
+ str(priority)
)


# Register commands
Expand Down
Loading

0 comments on commit f168a41

Please sign in to comment.