Re: Patch to eliminate SOFTWARE_SINGLE_STEP from ppc Was: Powerpc and software single step

Daniel Jacobowitz
2003-09-08T19:00:18Z

On Mon, Sep 08, 2003 at 02:58:30PM -0400, Jimi Xenidis wrote:
> >>>>> "AC" == Andrew Cagney <ac131313@redhat.com> writes:
>
> AC> What about a patch to eliminate the macros? Good incremental step.
>
> Your wish is my (very much delayed) command ;-)
>
> Changelog:
>
> 2003-09-08 Jimi Xenidis <jimix@watson.ibm.com>
>
> * config/rs6000/tm-rs6000.h: no longer require custion #define of
> SOFTWARE_SINGLE_STEP
> * config/powerpc/tm-linux.h: no longer require custion #define of
> SOFTWARE_SINGLE_STEP
> * rs6000-tdep.c (rs6000_gdbarch_init): Set up software_single_step
> while initing gdbarch

Eh, no. This patch would turn on software single-step for GNU/Linux
also - I doubt that's what you wanted to do.

>
> Patch:
> Index: gdb/rs6000-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
> retrieving revision 1.148
> diff -u -u -r1.148 rs6000-tdep.c
> --- gdb/rs6000-tdep.c 18 Aug 2003 20:04:55 -0000 1.148
> +++ gdb/rs6000-tdep.c 8 Sep 2003 17:51:53 -0000
> @@ -3015,6 +3015,9 @@
> /* Hook in ABI-specific overrides, if they have been registered. */
> gdbarch_init_osabi (info, gdbarch);
>
> + /* RS6000/AIX does not support PT_STEP. Has to be simulated. */
> + set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step);
> +
> return gdbarch;
> }
>
> Index: gdb/config/powerpc/tm-linux.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/powerpc/tm-linux.h,v
> retrieving revision 1.14
> diff -u -u -r1.14 tm-linux.h
> --- gdb/config/powerpc/tm-linux.h 3 Sep 2003 21:01:44 -0000 1.14
> +++ gdb/config/powerpc/tm-linux.h 8 Sep 2003 17:51:53 -0000
> @@ -31,12 +31,6 @@
> #undef IN_SOLIB_CALL_TRAMPOLINE
> #undef SKIP_TRAMPOLINE_CODE
>
> -/* We can single step on linux */
> -#undef SOFTWARE_SINGLE_STEP
> -#define SOFTWARE_SINGLE_STEP(p,q) internal_error (__FILE__, __LINE__, "Will never execute!")
> -#undef SOFTWARE_SINGLE_STEP_P
> -#define SOFTWARE_SINGLE_STEP_P() 0
> -
> /* Make sure nexti gets the help it needs for debugging assembly code
> without symbols */
>
> Index: gdb/config/rs6000/tm-rs6000.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/rs6000/tm-rs6000.h,v
> retrieving revision 1.26
> diff -u -u -r1.26 tm-rs6000.h
> --- gdb/config/rs6000/tm-rs6000.h 3 Sep 2003 21:01:44 -0000 1.26
> +++ gdb/config/rs6000/tm-rs6000.h 8 Sep 2003 17:51:53 -0000
> @@ -90,12 +90,6 @@
> extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
> #define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
>
> -/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
> -
> -#define SOFTWARE_SINGLE_STEP_P() 1
> -extern void rs6000_software_single_step (enum target_signal, int);
> -#define SOFTWARE_SINGLE_STEP(sig,bp_p) rs6000_software_single_step (sig, bp_p)
> -
> /* Notice when a new child process is started. */
>
> #define TARGET_CREATE_INFERIOR_HOOK rs6000_create_inferior
>
>
>
>

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer