public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Omair Javaid <omair.javaid@linaro.org>
To: Pedro Alves <palves@redhat.com>
Cc: Yao Qi <yao@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Support for HWbreak/watchpoint accross fork/vfork on arm-native
Date: Fri, 14 Feb 2014 00:06:00 -0000	[thread overview]
Message-ID: <52FD5E06.6010900@linaro.org> (raw)
In-Reply-To: <52FD117B.8060401@redhat.com>


On 13/02/2014 23:39, Pedro Alves wrote:
>> +static int
>> +update_registers_callback (struct lwp_info *lwp, void *arg)
>> +{
>> +  struct update_registers_data *data = (struct update_registers_data *) arg;
>> +
>> +  /* Force iterate_over_lwps to return matched lwp_info*.  */
>> +  if (arg == NULL)
>> +    return 1;
>> +
> You don't seem to have addressed my comment here?  It was:
>
> "I don't understand this.  It seems nothing passes a NULL arg."

I was using iterate_over_lwps to return matching lwp_info struct and 
that happens only when if update_registers_callback returns 1.
Its not being used anywhere now and can be removed.

>
>
>>     if (watchpoint)
>>       {
>>         count = arm_linux_get_hw_watchpoint_count ();
>> -      bpts = t->wpts;
>> -      dir = -1;
>> +      bpts = arm_linux_get_debug_reg_state (pid)->wpts;
>> +      if (count > MAX_WPTS)
>> +        warning (_("arm-linux-gdb supports %d hardware watchpoints but target \
>> +                 supports %d"), MAX_WPTS, count);
> Like in the Aarch64 port, add a 'count = MAX_WPTS' as well, otherwise
> GDB would access the arrays out of bounds when that happens.
OK will update and repost.
>
>>       }
>>     else
>>       {
>>         count = arm_linux_get_hw_breakpoint_count ();
>> -      bpts = t->bpts;
>> -      dir = 1;
>> +      bpts = arm_linux_get_debug_reg_state (pid)->bpts;
>> +      if (count > MAX_BPTS)
>> +        warning (_("arm-linux-gdb supports %d hardware breakpoints but target \
>> +                 supports %d"), MAX_BPTS, count);
> Likewise.
OK will update and repost.
>
>>       }
>>   
>>     for (i = 0; i < count; ++i)
>>       if (!arm_hwbp_control_is_enabled (bpts[i].control))

  reply	other threads:[~2014-02-14  0:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 22:12 Omair Javaid
2014-01-30 22:23 ` Omair Javaid
2014-02-07 15:32   ` Pedro Alves
2014-02-08  0:49   ` Yao Qi
2014-02-12 15:40     ` Omair Javaid
2014-02-13  5:05       ` Yao Qi
2014-02-13 18:40       ` Pedro Alves
2014-02-14  0:06         ` Omair Javaid [this message]
2014-03-08 16:29           ` Omair Javaid
2014-03-10 15:13             ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FD5E06.6010900@linaro.org \
    --to=omair.javaid@linaro.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=yao@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).