This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA [arch-utils.c] Turn off unused PC bits in legacy_breakpoint_from_pc()
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: RFA [arch-utils.c] Turn off unused PC bits in legacy_breakpoint_from_pc()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 09 May 2001 16:26:00 -0400
- Cc: gdb-patches at sources dot redhat dot com
- References: <3ACDCF3D.90609740@redhat.com>
Yes, it should be stripping things off so that the value returned is the
real address and size.
Andrew
> 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. */