Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de>
Cc: gdb-patches@sources.redhat.com, uweigand@de.ibm.com
Subject: Re: [PATCH] S/390 port modernization 2/4
Date: Thu, 04 Dec 2003 22:27:00 -0000	[thread overview]
Message-ID: <vt2k75cz0de.fsf@zenia.home> (raw)
In-Reply-To: <200312042006.VAA07709@faui1d.informatik.uni-erlangen.de>


> ! static void
> ! s390_fix_watch_points (void)
>   {
> +   int tid = s390_inferior_tid ();
> + 
>     per_struct per_info;
>     ptrace_area parea;
>   
> +   CORE_ADDR watch_lo_addr = 0, watch_hi_addr = (CORE_ADDR)-1;
> +   struct watch_area *area;
> + 
> +   for (area = watch_base; area; area = area->next)
> +     {
> +       watch_lo_addr = min (watch_lo_addr, area->lo_addr);
> +       watch_hi_addr = max (watch_hi_addr, area->hi_addr);
> +     }
> + 

Is this correct?  Since CORE_ADDR is unsigned, the initial value of
watch_hi_addr will compare greater than any watch area's hi_addr, so
the 'max' will never change its value.  Same for watch_lo_addr.  Don't
you want to set watch_lo_addr to (CORE_ADDR) -1, and watch_hi_addr to
0?


  reply	other threads:[~2003-12-04 22:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-04 20:07 Ulrich Weigand
2003-12-04 22:27 ` Jim Blandy [this message]
2003-12-04 23:53   ` Ulrich Weigand

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=vt2k75cz0de.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=uweigand@de.ibm.com \
    --cc=weigand@i1.informatik.uni-erlangen.de \
    /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