Hi developers,
In src/base/remote_gdb.cc, insertHardBreak() inserts a hard breakpoint to
hardBreakMap. But it does not really insert an object of HardBreakpoint to
the hardBreakMap.

When the bkpt==0, an object is created but never insert to hardBreakMap. So
the object will never be deleted.

   557 bool
   558 BaseRemoteGDB::insertHardBreak(Addr addr, size_t len)
   559 {
   560     if (len != sizeof(MachInst))
   561         panic("invalid length\n");
   562 
   563     DPRINTF(GDBMisc, "inserting hardware breakpoint at %#x\n", addr);
   564 
   565     HardBreakpoint *&bkpt = hardBreakMap[addr];
   566     if (bkpt == 0)
   567         bkpt = new HardBreakpoint(this, addr);
   568 
   569     bkpt->refcount++;
   570 
   571     return true;
   572 }

Regards,
Hu



_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to