I got it. Thanks a lot. Hu
-----Original Message----- From: gem5-dev [mailto:[email protected]] On Behalf Of nathan binkert via gem5-dev Sent: Tuesday, November 4, 2014 1:41 AM To: gem5 Developer List Subject: Re: [gem5-dev] remote gdb bug It actually is inserted into the map. Notice the type of bkpt. It is actually a *reference* to a pointer. So, when bkpt is modified, it updates the location in the map. Nate On Sat Nov 01 2014 at 10:44:53 PM He Hu via gem5-dev <[email protected]> wrote: > 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 > [email protected] > http://m5sim.org/mailman/listinfo/gem5-dev > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
