This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: cole945 at gmail dot com (Wei-cheng Wang)
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 8 Apr 2015 18:56:10 +0200 (CEST)
- Subject: Re: [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver.
- Authentication-results: sourceware.org; auth=none
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