Binutils with MCST patches
Go to file
Pedro Alves d708bcd102 Conditional Z1 breakpoint hangs GDBserver.
While trying to fix hbreak2.exp against GDBserver I noticed this...

 (gdb) hbreak main if 1
 Sending packet: $m400580,40#2e...Packet received: e8d2ffffff5dc3554889e54883ec10c745fc00000000eb0eb800000000e8c1ffffff8345fc01817dfce70300007ee9b800000000c9c3662e0f1f840000000000
 Sending packet: $m40058f,1#31...Packet received: c7
 Hardware assisted breakpoint 1 at 0x40058f: file ../../../src/gdb/testsuite/gdb.base/break-idempotent.c, line 46.
 Sending packet: $Z1,40058f,1;X3,220127#9b...
 *hangs forever*

The issue is that nothing advances the packet pointer if
add_breakpoint_condition either fails to parse the agent expression,
or fails to find the breakpoint, resulting in an infinite loop in
process_point_options.  The latter case should really be fixed by
GDBserver tracking GDB Z1 breakpoints in its breakpoint structures
like Z0 breakpoints are, but the latter case still needs handling.
add_breakpoint_commands has the same issue, though at present I don't
know any way to trigger it other than sending a manually cooked
packet.

Unbelievably, it doesn't look like we have any test that tries setting
a conditional hardware breakpoint.  Looking at cond-eval-mode.exp, it
looks like the file was meant to actually test something, but it's
mostly empty today.  This patch adds tests that tries all sorts of
conditional breakpoints and watchpoints.  The test hangs/fails without
the GDBserver fix.

Tested on x86_64 Fedora 17.

gdb/gdbserver/
2014-04-10  Pedro Alves  <palves@redhat.com>

	* mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
	Check if the condition or command is NULL before checking if the
	breakpoint is known.  On success, return true.
	* mem-break.h (add_breakpoint_condition): Document return.
	(add_breakpoint_commands): Add describing comment.
	* server.c (skip_to_semicolon): New function.
	(process_point_options): Use it.

gdb/testsuite/
2014-04-10  Pedro Alves  <palves@redhat.com>

	* gdb.base/cond-eval-mode.c: New file.
	* gdb.base/cond-eval-mode.exp: Use standard_testfile.  Adjust
	prepare_for_testing to build the new file.  Check result of
	runto_main.
	(test_break, test_watch): New procedures.
	(top level): Use them.
2014-04-10 17:14:12 +01:00
bfd bfd/ChangeLog 2014-04-10 19:50:33 +04:00
binutils Report an error on objcopy/strip of sectionless binaries 2014-04-07 13:59:31 +09:30
config strip off +x bits on non-executable/script files 2013-12-07 02:03:03 -05:00
cpu strip off +x bits on non-executable/script files 2013-12-07 02:03:03 -05:00
elfcpp Update copyright years 2014-03-05 22:16:15 +10:30
etc
gas bfd/ChangeLog 2014-04-10 19:50:33 +04:00
gdb Conditional Z1 breakpoint hangs GDBserver. 2014-04-10 17:14:12 +01:00
gold 2014-04-02 Sriraman Tallam <tmsriram@google.com> 2014-04-02 17:07:47 -07:00
gprof autoreconf 2014-03-12 15:02:00 +10:30
include bfd/ChangeLog 2014-04-10 19:50:33 +04:00
intl
ld bfd/ChangeLog 2014-04-10 19:50:33 +04:00
libdecnumber merge from gcc 2013-10-16 00:29:48 +00:00
libiberty [PATCH] include * ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, PARAMS) (VPARAMS, VA_START, VA_OPEN, VA_CLOSE, VA_FIXEDARG, CONST) (VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, AND, DOTS) (NOARGS): Don't define. * libiberty.h (expandargv, writeargv): Don't use PARAMS. libiberty * _doprint.c (checkit): Use stdarg, not VA_* macros. * asprintf.c (asprintf): Use stdarg, not VA_* macros. * concat.c (concat_length, concat_copy, concat_copy2, concat) (reconcat): Use stdarg, not VA_* macros. * snprintf.c (snprintf): Use stdarg, not VA_* macros. * vasprintf.c (checkit): Use stdarg, not VA_* macros. * vsnprintf.c (checkit): Use stdarg, not VA_* macros. 2014-01-21 08:52:09 -07:00
opcodes Add support for Intel SGX instructions 2014-04-04 08:24:47 -07:00
readline * readline.c (bind_arrow_keys_internal): 2013-09-24 14:49:48 +00:00
sim Add support for two new moxie sign-extension instructions 2014-04-02 23:58:01 -04:00
texinfo
.cvsignore
.gitignore
COPYING
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB 2013-10-01 Jeff Johnston <jjohnstn@redhat.com> 2013-10-01 18:14:04 +00:00
COPYING3
COPYING3.LIB
ChangeLog This fixes PR bootstrap/60620: 2014-04-04 22:54:42 +02:00
MAINTAINERS
Makefile.def This fixes PR bootstrap/60620: 2014-04-04 22:54:42 +02:00
Makefile.in This fixes PR bootstrap/60620: 2014-04-04 22:54:42 +02:00
Makefile.tpl * Makefile.tpl: Fix typo. * Makefile.in: Regenerate. 2013-11-08 11:11:42 -07:00
README
README-maintainer-mode
compile
config-ml.in
config.guess Import config.sub and config.guess from upstream. 2013-11-23 09:02:29 +10:30
config.rpath
config.sub Import config.sub and config.guess from upstream. 2013-11-23 09:02:29 +10:30
configure * configure.ac: Add user-friendly check for native x86_64-linux multilibs. * configure: Regenerate. 2013-12-16 13:42:54 -07:00
configure.ac * configure.ac: Add user-friendly check for native x86_64-linux multilibs. * configure: Regenerate. 2013-12-16 13:42:54 -07:00
depcomp
djunpack.bat
install-sh
libtool.m4 * libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical 2013-09-20 09:51:25 +00:00
ltgcc.m4
ltmain.sh PR target/59788 2014-02-06 11:01:57 +01:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
setup.com
src-release * src-release (do-proto-toplevel): Support subdir-path-prefixed 2013-10-15 20:45:52 +00:00
symlink-tree
ylwrap

README

		   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.