Go to file
Simon Marchi fa94b3a7c8 gdb: update Type.fields doc based on actual GDB behavior
I noticed two errors in the Type.fields documentation:

1. It is possible to call `fields` on an array type, in which case it
   returns one field representing the array's range.  It is not
   mentioned.

2. When calling `fields` on a type that doesn't have fields (by nature,
   like an int), GDB raises a TypeError.  It does not return an empty
   sequence, as currently documented.

Fix these, and change the text into a bullet list.  I find it easier to
read than one big paragraph.

The first issue is already tested in gdb.python/py-type.exp, but the
second one doesn't seem tested.  Add a test in gdb.python/py-type.exp
for it.

gdb/doc/ChangeLog:

	* python.texi (Types In Python): Re-organize Type.fields doc.
	Mention handling of array types.  Correct doc for when calling
	the method on another type.

gdb/testsuite/ChangeLog:

	* gdb.python/py-type.exp (test_fields): Test calling fields on
	an int type.

Change-Id: I11c688177504cb070b81a4446ac91dec50b56a22
2021-05-04 22:19:05 -04:00
bfd Automatic date update in version.in 2021-05-05 00:00:35 +00:00
binutils Fix attempt to free non-allocated pointer when parsing .debug_sup sections. 2021-04-30 12:28:39 +01:00
config
contrib
cpu
elfcpp
etc
gas RISC-V: PR27764, Add tests for A extension 2021-05-03 16:19:17 -07:00
gdb gdb: update Type.fields doc based on actual GDB behavior 2021-05-04 22:19:05 -04:00
gdbserver Fix x86_64 mingw build 2021-05-03 12:40:19 -06:00
gdbsupport Use rvalue reference in thread_pool::post_task 2021-04-30 10:04:56 -06:00
gnulib gnulib: import gendocs 2021-05-04 13:50:33 -04:00
gold
gprof
include Harmonize and improve auxiliary entries support for XCOFF 2021-04-22 12:28:50 +01:00
intl
ld PowerPC undefweak testcase 2021-05-05 10:35:31 +09:30
libctf
libdecnumber
libiberty
opcodes opcodes: xtensa: support branch visualization 2021-05-01 02:47:30 -07:00
readline
sim sim: m68hc11: tweak types to fix warnings 2021-05-04 22:06:23 -04:00
texinfo
zlib
.cvsignore
.gitattributes
.gitignore
ar-lib
ChangeLog Replace AC_PROG_CC with AC_PROG_CC_C99 in top level configure file. 2021-05-04 13:40:34 +01:00
compile
config-ml.in
config.guess
config.rpath
config.sub
configure Replace AC_PROG_CC with AC_PROG_CC_C99 in top level configure file. 2021-05-04 13:40:34 +01:00
configure.ac Replace AC_PROG_CC with AC_PROG_CC_C99 in top level configure file. 2021-05-04 13:40:34 +01:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.