This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RFA [arch-utils.c] Turn off unused PC bits in legacy_breakpoint_from_pc()
- To: gdb-patches at sources dot redhat dot com
- Subject: RFA [arch-utils.c] Turn off unused PC bits in legacy_breakpoint_from_pc()
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Fri, 06 Apr 2001 10:14:21 -0400
- Organization: Red Hat Canada
This is related to the ADDR_BITS_REMOVE() use have been talking about.
This patch would not be immediately necessary, but it seems the right
thing to do. We stay on the safe side and give a hint to someone who is
implementing a gdbarch_breakpoint_from_pc() implementation. I met Andrew
in the corridor sometime last week and we thought it would be a good
idea. This is the patch that corresponds to what we have discussed.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.23
diff -c -p -r1.23 arch-utils.c
*** arch-utils.c 2001/03/27 20:36:23 1.23
--- arch-utils.c 2001/04/06 13:26:03
***************
*** 55,60 ****
--- 55,63 ----
unsigned char *
legacy_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr)
{
+ #ifdef ADDR_BITS_REMOVE
+ *pcptr = ADDR_BITS_REMOVE (*pcptr);
+ #endif
/* {BIG_,LITTLE_}BREAKPOINT is the sequence of bytes we insert for a
breakpoint. On some machines, breakpoints are handled by the
target environment and we don't have to worry about them here. */