binutils-gdb/gdb/doc
Pedro Alves 936d299246 Make compare-sections work against all targets; add compare-sections [-r] tests.
This does two things:

1. Adds a test.

Recently compare-sections got a new "-r" switch, but given no test
existed for compare-sections, the patch was allowed in with no
testsuite addition.  This now adds a test for both compare-sections
and compare-sections -r.

2. Makes the compare-sections command work against all targets.

Currently, compare-sections only works with remote targets, and only
those that support the qCRC packet.  The patch makes it so that if the
target doesn't support accelerating memory verification, then GDB
falls back to comparing memory itself.  This is of course slower, but
it's better than nothing, IMO.  While testing against extended-remote
GDBserver I noticed that we send the qCRC request to the target if
we're connected, but not yet running a program.  That can't work of
course -- the patch fixes that.  This all also goes in the direction
of bridging the local/remote parity gap.

I didn't decouple 1. from 2., because that would mean that the test
would need to handle the case of the target not supporting the
command.

Tested on x86_64 Fedora 17, native, remote GDBserver, and
extended-remote GDBserver.  I also hack-disabled qCRC support to make
sure the fallback paths in remote.c work.

gdb/doc/
2014-05-20  Pedro Alves  <palves@redhat.com>

	* gdb.texinfo (Memory) <compare-sections>: Generalize comments to
	not be remote specific.  Add cross reference to the qCRC packet.
	(Separate Debug Files): Update cross reference to the qCRC packet.
	(General Query Packets) <qCRC packet>: Add anchor.

gdb/
2014-05-20  Pedro Alves  <palves@redhat.com>

	* NEWS: Mention that compare-sections now works with all targets.

	* remote.c (PACKET_qCRC): New enum value.
	(remote_verify_memory): Don't send qCRC if the target has no
	execution.  Use packet_support/packet_ok.  If the target doesn't
	support the qCRC packet, fallback to a deep memory copy.
	(compare_sections_command): Say "target image" instead of "remote
	executable".
	(_initialize_remote): Add PACKET_qCRC to the list of config
	packets that have no associated command.  Extend comment.
	* target.c (simple_verify_memory, default_verify_memory): New
	function.
	* target.h (struct target_ops) <to_verify_memory>: Default to
	default_verify_memory.
	(simple_verify_memory): New declaration.
	* target-delegates.c: Regenerate.

gdb/testsuite/
2014-05-20  Pedro Alves  <palves@redhat.com>

	* gdb.base/compare-sections.c: New file.
	* gdb.base/compare-sections.exp: New file.
2014-05-20 19:11:39 +01:00
..
ChangeLog Make compare-sections work against all targets; add compare-sections [-r] tests. 2014-05-20 19:11:39 +01:00
Doxyfile-base.in Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
Doxyfile-gdb-api.in Doxygenate gdbtypes.h 2014-03-12 19:36:45 -07:00
Doxyfile-gdb-xref.in Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
Doxyfile-gdbserver.in Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
Makefile.in Add obviously forgotten "PACKAGE = @PACKAGE@" to gdb/doc/Makefile.in 2014-05-09 23:16:33 -04:00
a4rc.sed
agentexpr.texi Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
all-cfg.texi Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
annotate.texinfo Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
doxy-index.in Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
fdl.texi 2010-06-21 Stan Shebs <stan@codesourcery.com> 2010-06-21 16:24:59 +00:00
filter-for-doxygen Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
filter-params.pl Add Doxygen support to GDB 2014-02-10 19:10:34 -08:00
gdb.texinfo Make compare-sections work against all targets; add compare-sections [-r] tests. 2014-05-20 19:11:39 +01:00
gpl.texi * gpl.texi: Update to version 3 of the GPL. 2009-12-21 07:30:10 +00:00
guile.texi guile: Add 'history-append!' procedure. 2014-02-26 22:59:42 +01:00
lpsrc.sed
observer.texi Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
psrc.sed
python.texi Copy over changes from guile.texi. 2014-05-17 09:13:00 -07:00
refcard.tex Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
stabs.texinfo Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
stack_frame.eps From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 14:35:04 +00:00
stack_frame.pdf From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 10:24:35 +00:00
stack_frame.png From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 10:24:35 +00:00
stack_frame.svg From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 10:24:35 +00:00
stack_frame.txt From Jeremy Bennett <jeremy.bennett@embecosm.com>: 2009-03-21 10:24:35 +00:00