Go to file
Andrew Burgess 0618ecf6eb gdb/guile: don't try to print location for watchpoints
Currently, using the guile API, if a user tries to print a breakpoint
object that represents a watchpoint, then GDB will crash.  For
example:

  (gdb) guile (use-modules (gdb))
  (gdb) guile (define wp1 (make-breakpoint "some_variable" #:type BP_WATCHPOINT #:wp-class WP_WRITE))
  (gdb) guile (register-breakpoint! wp1)
  (gdb) guile (display wp1) (newline)
  Aborted (core dumped)

This turns out to be because GDB calls event_location_to_string on the
breakpoints location, and watchpoint breakpoints don't have a
location.

This commit resolves the crash by just skipping the printing of the
location if the breakpoint doesn't have one.

Potentially, we could improve on this by printing details about what
the watchpoint is watching, however, I'm considering this a possible
future enhancement, this commit focuses just on having GDB not crash.

gdb/ChangeLog:

	* guile/scm-breakpoint.c (bpscm_print_breakpoint_smob): Only print
	breakpoint locations when the breakpoint actually has a location.

gdb/testsuite/ChangeLog:

	* gdb.guile/scm-breakpoint.exp (test_watchpoints): Print the
	watchpoint object before and after registering it with GDB.
2021-05-06 10:44:29 +01:00
bfd elf: Always append ".COUNT" to local symbols 2021-05-05 20:29:01 -07: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/guile: don't try to print location for watchpoints 2021-05-06 10:44:29 +01: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 PR27716, build failure for msdosdjgpp: PATH_MAX undeclared 2021-04-14 15:06:11 +09:30
include libctf, include: support an alternative encoding for nonrepresentable types 2021-05-06 09:30:59 +01:00
intl
ld libctf, ld: fix test results for upstream GCC 2021-05-06 09:31:31 +01:00
libctf libctf, ld: fix test results for upstream GCC 2021-05-06 09:31:31 +01:00
libdecnumber
libiberty
opcodes opcodes: xtensa: support branch visualization 2021-05-01 02:47:30 -07:00
readline
sim sim: h8300 special case test 2021-05-06 17:11:49 +09: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.