This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver.


Wei-cheng Wang wrote:

> +/* Implement supports_z_point_type target-ops.
> +   Returns true if type Z_TYPE breakpoint is supported.
> +
> +   Handling software breakpoint at server side, so tracepoints
> +   and breakpoints can be inserted at the same location.  */
> +
> +static int
> +ppc_supports_z_point_type (char z_type)
> +{
> +  switch (z_type)
> +    {
> +    case Z_PACKET_SW_BP:
> +      return 1;
> +    case Z_PACKET_HW_BP:
> +    case Z_PACKET_WRITE_WP:
> +    case Z_PACKET_ACCESS_WP:
> +    default:
> +      return 0;
> +    }
> +}

Well, if we add a function that returns true on supports_z_point_type
for Z_PACKET_SW_BP, then we also need to provide functions that
actually do insert/remove such breakpoints.  (I know that you have
that in the next patch, but each patch in a series should be
functionally correct on its own, so they really should be here.)

Otherwise looks good.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]