Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch is the result of running 'isort .' in the gdb directory.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
|
|
This commit is the result of the following actions:
- Running gdb/copyright.py to update all of the copyright headers to
include 2024,
- Manually updating a few files the copyright.py script told me to
update, these files had copyright headers embedded within the
file,
- Regenerating gdbsupport/Makefile.in to refresh it's copyright
date,
- Using grep to find other files that still mentioned 2023. If
these files were updated last year from 2022 to 2023 then I've
updated them this year to 2024.
I'm sure I've probably missed some dates. Feel free to fix them up as
you spot them.
|
|
This commit is the result of running the gdb/copyright.py script,
which automated the update of the copyright year range for all
source files managed by the GDB project to be updated to include
year 2023.
|
|
This commit brings all the changes made by running gdb/copyright.py
as per GDB's Start of New Year Procedure.
For the avoidance of doubt, all changes in this commits were
performed by the script.
|
|
Re-format all Python files using black [1] version 21.4b0. The goal is
that from now on, we keep all Python files formatted using black. And
that we never have to discuss formatting during review (for these files
at least) ever again.
One change is needed in gdb.python/py-prettyprint.exp, because it
matches the string representation of an exception, which shows source
code. So the change in formatting must be replicated in the expected
regexp.
To document our usage of black I plan on adding this to the "GDB Python
Coding Standards" wiki page [2]:
--8<--
All Python source files under the `gdb/` directory must be formatted
using black version 21.4b0.
This specific version can be installed using:
$ pip3 install 'black == 21.4b0'
All you need to do to re-format files is run `black <file/directory>`,
and black will re-format any Python file it finds in there. It runs
quite fast, so the simplest is to do:
$ black gdb/
from the top-level.
If you notice that black produces changes unrelated to your patch, it's
probably because someone forgot to run it before you. In this case,
don't include unrelated hunks in your patch. Push an obvious patch
fixing the formatting and rebase your work on top of that.
-->8--
Once this is merged, I plan on setting a up an `ignoreRevsFile`
config so that git-blame ignores this commit, as described here:
https://github.com/psf/black#migrating-your-code-style-without-ruining-git-blame
I also plan on working on a git commit hook (checked in the repo) to
automatically check the formatting of the Python files on commit.
[1] https://pypi.org/project/black/
[2] https://sourceware.org/gdb/wiki/Internals%20GDB-Python-Coding-Standards
gdb/ChangeLog:
* Re-format all Python files using black.
gdb/testsuite/ChangeLog:
* Re-format all Python files using black.
* gdb.python/py-prettyprint.exp (run_lang_tests): Adjust.
Change-Id: I28588a22c2406afd6bc2703774ddfff47cd61919
|
|
This commits the result of running gdb/copyright.py as per our Start
of New Year procedure...
gdb/ChangeLog
Update copyright year range in copyright header of all GDB files.
|
|
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
This commit applies all changes made after running the gdb/copyright.py
script.
Note that one file was flagged by the script, due to an invalid
copyright header
(gdb/unittests/basic_string_view/element_access/char/empty.cc).
As the file was copied from GCC's libstdc++-v3 testsuite, this commit
leaves this file untouched for the time being; a patch to fix the header
was sent to gcc-patches first.
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
gdb/ChangeLog:
Update copyright year range in all GDB files
|
|
This applies the second part of GDB's End of Year Procedure, which
updates the copyright year range in all of GDB's files.
gdb/ChangeLog:
Update copyright year range in all GDB files.
|
|
gdb/ChangeLog:
Update year range in copyright notice of all files.
|
|
gdb/ChangeLog:
PR python/18299
* python/lib/gdb/printing.py (register_pretty_printer): Handle
name or __name__ attributes. Handle gdb module as first argument.
gdb/testsuite/ChangeLog:
* gdb.python/py-pp-maint.py: Move "replace" testing to ...
* gdb.python/py-pp-registration.exp: ... here. New file.
* gdb.python/py-pp-registration.c: New file.
* gdb.python/py-pp-registration.py: New file.
|
|
gdb/ChangeLog:
Update year range in copyright notice of all files.
|
|
|
|
Two modifications:
1. The addition of 2013 to the copyright year range for every file;
2. The use of a single year range, instead of potentially multiple
year ranges, as approved by the FSF.
|
|
* gdb.base/charset.exp: Change print syntax for Python 3
compatibility.
* gdb.python/py-block.exp: Ditto.
* gdb.python/py-breakpoint.exp: Ditto.
* gdb.python/py-cmd.exp: Ditto.
* gdb.python/py-events.py: Ditto.
* gdb.python/py-finish-breakpoint.py: Ditto.
* gdb.python/py-finish-breakpoint2.exp: Ditto.
* gdb.python/py-finish-breakpoint2.py: Ditto.
* gdb.python/py-frame-inline.exp: Ditto.
* gdb.python/py-frame.exp: Ditto.
* gdb.python/py-infthread.exp: Ditto.
* gdb.python/py-objfile.exp: Ditto.
* gdb.python/py-parameter.exp: Ditto.
* gdb.python/py-progspace.exp: Ditto.
* gdb.python/py-prompt.exp: Ditto.
* gdb.python/py-symbol.exp: Ditto.
* gdb.python/py-symtab.exp: Ditto.
* gdb.python/py-template.exp: Ditto.
* gdb.python/py-value-cc.exp: Ditto.
* gdb.python/python.exp: Ditto.
* gdb.python/source2.py: Ditto.
* gdb.python/lib-types.exp: Change print syntax for Python 3
compatibility.
Use sorted() function rather than sort() method.
Accept either int or long values for enum values.
* gdb.python/py-events.exp: Use exec(open(...).read()) instead of
execfile for Python 3 compatibility.
* gdb.python/py-evsignal.exp: Ditto.
* gdb.python/py-evthreads.exp: Ditto.
* gdb.python/py-mi.exp: Ditto.
* gdb.python/py-pp-maint.exp: Ditto.
* gdb.python/py-prettyprint.exp: Ditto.
* gdb.python/py-finish-breakpoint.exp: Change print syntax for
Python 3 compatibility.
Skip tests for Python 2.4.
* gdb.python/py-inferior.exp: Change print syntax for
Python 3 compatibility.
Use byte string rather than character string in memory write test
if Python 3.
* gdb.python/py-pp-maint.py: Change class declarations to "new
class" syntax.
* gdb.python/py-prettyprint.py: Change iterator class to generator
function for Python 3 compatibility.
Make all classes "new style".
Fix indentation issue and stray semicolon.
* gdb.python/py-shared.expChange print syntax for Python 3
compatibility.
Define "long" if Python 3.
* gdb.python/py-type.exp: Change print syntax for Python 3
compatibility.
Accept either int or long values for enum values.
* gdb.python/py-value.exp: Change print syntax for Python 3
compatibility.
Skip "long" and "unicode" tests if Python 3.
Accept either "type" or "class" in type checks.
* lib/gdb.exp (gdb_py_is_py3k): New flag set if Python 3.
(gdb_py_is_py24): New flag set if Python 2.4 or 2.5.
|
|
PR python/13281:
* gdbtypes.h (TYPE_FLAG_ENUM): New macro.
(struct main_type) <flag_flag_enum>: New field.
* dwarf2read.c (process_enumeration_scope): Detect "flag" enums.
* NEWS: Add entries.
* c-valprint.c (c_val_print) <TYPE_CODE_ENUM>: Handle "flag"
enums.
* python/lib/gdb/printing.py (_EnumInstance): New class.
(FlagEnumerationPrinter): Likewise.
gdb/doc
* gdb.texinfo (gdb.printing): Document FlagEnumerationPrinter.
gdb/testsuite
* gdb.base/printcmds.c (enum flag_enum): New.
(three): New global.
* gdb.base/printcmds.exp (test_print_enums): Add test for flag
enum printing.
* gdb.python/py-pp-maint.py (build_pretty_printer): Instantiate
FlagEnumerationPrinter.
* gdb.python/py-pp-maint.exp: Add tests for FlagEnumerationPrinter.
* gdb.python/py-pp-maint.c (enum flag_enum): New.
(fval): New global.
|
|
gdb/ChangeLog:
Copyright year update in most files of the GDB Project.
|
|
`replace'.
testsuite/
* gdb.python/py-pp-maint.py: Add tests for `replace' arg.
|
|
|
|
enable pretty-printer, disable pretty-printer.
* NEWS: Mention them.
* data-directory/Makefile.in (PYTHON_FILES): Add gdb/printing.py,
gdb/command/__init__.py, gdb/command/pretty_printers.py.
* python/lib/gdb/__init__.py: Install pretty-printer commands.
* python/lib/gdb/printing.py: New file.
* python/lib/gdb/command/__init__.py: New file.
* python/lib/gdb/command/pretty_printers.py: New file.
doc/
* gdb.texinfo (Pretty Printing): Expand into three sections,
introduction, example, and commands.
(Python API): Delete section Disabling Pretty-Printers, merge into
Selecting Pretty-Printers.
(Writing a Pretty-Printer): New section. Move the pretty-printer
example here, and reformat to match python coding style. Add a second
example using the gdb.printing module.
(Python modules): Add gdb.printing.
testsuite/
* gdb.python/py-pp-maint.c: New file.
* gdb.python/py-pp-maint.exp: New file.
* gdb.python/py-pp-maint.py: New file.
|