This is the mail archive of the gdb-patches@sources.redhat.com 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]

RE: Patch for gdb5.0; enable hardware watchpoints on UnixWare


> > > >   2. In go32_insert_aligned_watchpoint...
> > >
> > > I think you are looking at an old version of go32-nat.c.
> >
> > My comments refer to the version labeled '1.6' in the cvsweb.  Is there
> > a later one I could look at?
>
> That's the latest version.  Hmm...  Oh, I see what happened: you were
> talking about go32_insert_aligned_watchpoint, whereas I was looking at
> go32_remove_aligned_watchpoint (because you said that it has the same
> problems).

Well, a "lesser" "problem", you can still simplify
remove_aligned_watchpoint.

Before:

  read_write_bits = rw ? DR_RW_READWRITE : DR_RW_WRITE;

  switch (len)
    {
      case 4:
        len_bits = DR_LEN_4;
...
      default:
        len_bits = 0x10;
    }

  if (len == 2)
    {
      if (addr % 2)
        return go32_handle_nonaligned_watchpoint (wp_remove, waddr, addr,
                                                  len, rw);
    }
...

after:

 if (addr % len)
    return i386_handle_nonaligned_watchpoint (wp_remove, addr, len, rw);

  switch (len)
    {
      case 4:
        len_bits = DR_LEN_4;
        break;
...
      default:
        return i386_handle_nonaligned_watchpoint (wp_remove, addr, len, rw);
    }

  read_write_bits = rw ? DR_RW_READWRITE : DR_RW_WRITE;

--
John Hughes <john@Calva.COM>,
        CalvaEDI SA.                            Tel: +33-1-4313-3131
        66 rue du Moulin de la Pointe,          Fax: +33-1-4313-3139
        75013 PARIS.


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