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 v2 7/7] Support software breakpoints for ARM linux in GDBServer.


On 10/05/2015 05:44 PM, Antoine Tremblay wrote:

> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -3,6 +3,8 @@
>  
>  *** Changes since GDB 7.10
>  
> +* Support for software breakpoints on ARM linux was added in GDBServer.

Putting a user hat on, what does this mean?  Why is it news worthy?

> +
>  * Record btrace now supports non-stop mode.
>  
>  * Support for tracepoints on aarch64-linux was added in GDBserver.
> diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
> index d16ea60..bd499f8 100644
> --- a/gdb/gdbserver/linux-arm-low.c
> +++ b/gdb/gdbserver/linux-arm-low.c
> @@ -336,6 +336,28 @@ arm_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
>      }
>  }
>  
> +/* Get the breakpoint from the remote kind
> +   2 is thumb-16
> +   3 is thumb2-32
> +   4 is arm
> +*/
> +static const unsigned char *
> +arm_breakpoint_from_kind (int *kind)
> +{
> +  switch (*kind) {
> +  case 2:

Formatting, break line before {, indent case.

> +    return (unsigned char *) &thumb_breakpoint;
> +  case 3:
> +    *kind = 4;
> +    return (unsigned char *) &thumb2_breakpoint;
> +  case 4:
> +    return (unsigned char *) &arm_breakpoint;
> +  default:
> +    return NULL;
> +  }
> +  return NULL;
> +}
> +

Thanks,
Pedro Alves


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