No description
Find a file
Sergio Durigan Junior a280dbd160 Based on the discussion at:
<https://sourceware.org/ml/gdb-patches/2013-09/msg00301.html>
<https://sourceware.org/ml/gdb-patches/2013-09/msg00383.html>

This patch adds a new convenience function called $_isvoid, whose
only purpose is to check whether an expression is void or not.
This became necessary because the new convenience variable
$_exitsignal (not yet approved) has a mutual exclusive behavior
with $_exitcode, i.e., when one is "defined" (i.e., non-void),
the other is cleared (i.e., becomes void).  Doug wanted a way to
identify which variable to use, and checking for voidness is the
obvious solution.

It is worth mentioning that my first attempt, after a conversation with
Doug, was to actually implement a new $_isdefined() convenience
function.  I would do that (for convenience variables) by calling
lookup_only_internalvar.  However, I found a few problems:

- Whenever I called $_isdefined ($variable), $variable became defined
  (with a void value), and $_isdefined always returned true.

- Then, I tried to implement $_isdefined ("variable"), and do the "$" +
  "variable" inside GDB, thus making it impossible for GDB to create the
  convenience variable.  However, it was hard to extract the string
  without having to mess with values and their idiossincrasies.
  Therefore, I decided to abandon this attempt (specially because I
  didn't want to spend too much time struggling with it).

Anyway, after talking to Doug again we decided that it would be easier
to implement $_isvoid, and this will probably help in cases like
<http://stackoverflow.com/questions/3744554/testing-if-a-gdb-convenience-variable-is-defined>.

I wrote a NEWS entry for it, and some new lines on the documentation.

gdb/
2013-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>

	* NEWS: Mention new convenience function $_isvoid.
	* value.c (isvoid_internal_fn): New function.
	(_initialize_values): Add new convenience function $_isvoid.

gdb/doc/
2013-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.texinfo (Convenience Functions): Mention new convenience
	function $_isvoid.

gdb/testsuite/
2013-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gdb.base/gdbvars.c (foo_void): New function.
	(foo_int): Likewise.
	* gdb.base/gdbvars.exp (test_convenience_functions): New
	function.  Call it.
2013-09-16 17:47:30 +00:00
bfd daily update 2013-09-16 00:00:04 +00:00
binutils * dwarf.c (dwarf_vmatoa): Rename to dwarf_vmatoa_1 and add a 2013-09-12 09:14:47 +00:00
config
cpu
elfcpp
etc
gas gas/config/tc-arm.c: Fix parsing of NEON load/store element sizes. 2013-09-16 09:34:30 +00:00
gdb Based on the discussion at: 2013-09-16 17:47:30 +00:00
gold Use relative relocation for R_X86_64_32 on x32 2013-09-03 17:38:57 +00:00
gprof
include PR binutils/15834 2013-08-23 07:54:19 +00:00
intl
ld * dwarf.c (dwarf_vmatoa): Rename to dwarf_vmatoa_1 and add a 2013-09-12 09:14:47 +00:00
libdecnumber
libiberty merge from gcc 2013-09-12 16:08:09 +00:00
opcodes PR gas/15914 2013-09-04 07:59:33 +00:00
readline
sim sim: mark complete_option_list args const to fix build warnings 2013-09-03 20:45:08 +00:00
texinfo
.cvsignore
.gitignore
ChangeLog src-release: Strip "-cvs" from GDB source dir and tarball. 2013-08-17 01:07:52 +00:00
compile
config-ml.in
config.guess
config.rpath
config.sub
configure 2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-08-12 11:36:35 +00:00
configure.ac 2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-08-12 11:36:35 +00:00
COPYING
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
COPYING3
COPYING3.LIB
depcomp
djunpack.bat
install-sh
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS
Makefile.def 2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-08-12 11:36:35 +00:00
Makefile.in 2013-08-12 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2013-08-12 11:36:35 +00:00
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
README
README-maintainer-mode
setup.com
src-release src-release: Strip "-cvs" from GDB source dir and tarball. 2013-08-17 01:07:52 +00:00
symlink-tree
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.