This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: fix some obsolete comments
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 17 Jan 2013 08:23:24 -0700
- Subject: FYI: fix some obsolete comments
I happened to notice a couple of comments referencing the
BREAKPOINT_FROM_PC macro, which was removed in 2007:
2007-06-13 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (BREAKPOINT_FROM_PC): Replace by
gdbarch_breakpoint_from_pc.
[...]
This patch fixes them.
Tested by rebuilding.
Tom
2013-01-17 Tom Tromey <tromey@redhat.com>
* mem-break.c: Remove obsolete comment.
* bfin-tdep.c (bfin_breakpoint_from_pc): Fix comment.
Index: bfin-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/bfin-tdep.c,v
retrieving revision 1.14
diff -u -r1.14 bfin-tdep.c
--- bfin-tdep.c 1 Jan 2013 06:32:39 -0000 1.14
+++ bfin-tdep.c 17 Jan 2013 15:19:16 -0000
@@ -574,11 +574,11 @@
return map_gcc_gdb[reg];
}
-/* This function implements the BREAKPOINT_FROM_PC macro. It returns
- a pointer to a string of bytes that encode a breakpoint instruction,
- stores the length of the string to *lenptr, and adjusts the program
- counter (if necessary) to point to the actual memory location where
- the breakpoint should be inserted. */
+/* This function implements the 'breakpoint_from_pc' gdbarch method.
+ It returns a pointer to a string of bytes that encode a breakpoint
+ instruction, stores the length of the string to *lenptr, and
+ adjusts the program counter (if necessary) to point to the actual
+ memory location where the breakpoint should be inserted. */
static const unsigned char *
bfin_breakpoint_from_pc (struct gdbarch *gdbarch,
Index: mem-break.c
===================================================================
RCS file: /cvs/src/src/gdb/mem-break.c,v
retrieving revision 1.27
diff -u -r1.27 mem-break.c
--- mem-break.c 1 Jan 2013 06:32:47 -0000 1.27
+++ mem-break.c 17 Jan 2013 15:19:16 -0000
@@ -20,10 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-
-/* This file is only useful if BREAKPOINT_FROM_PC is set. If not, we
- punt. */
-
#include "symtab.h"
#include "breakpoint.h"
#include "inferior.h"