Lines Matching refs:address

29 BreakpointManager::InstalledBreakpoint::InstalledBreakpoint(addr_t address)
32 address(address)
86 breakpoint->address = 0;
101 const addr_t address = (addr_t)_address;
108 // check whether there's already a breakpoint at the address
109 InstalledBreakpoint* installed = fBreakpoints.Lookup(address);
114 installed = new(std::nothrow) InstalledBreakpoint(address);
123 status_t error = _InstallHardwareBreakpoint(breakpoint, address);
131 status_t error = _InstallSoftwareBreakpoint(installed, address);
147 const addr_t address = (addr_t)_address;
151 InstalledBreakpoint* installed = fBreakpoints.Lookup(address);
171 const addr_t address = (addr_t)_address;
175 InstalledWatchpoint* watchpoint = _FindWatchpoint(address);
193 status_t error = _InstallWatchpoint(watchpoint, address, type, length);
204 BreakpointManager::UninstallWatchpoint(void* address)
208 InstalledWatchpoint* watchpoint = _FindWatchpoint((addr_t)address);
247 /*! \brief Returns whether the given address can be accessed in principle.
253 const addr_t address = (addr_t)_address;
256 if (IS_USER_ADDRESS(address))
265 Tries to read \a size bytes of data from user memory address \a address
270 \param address The user memory address from which to read.
282 const addr_t address = (addr_t)_address;
286 status_t error = _ReadMemory(address, buffer, size, bytesRead);
293 // address of the first possibly intersecting software breakpoint
295 = std::max(address, (addr_t)DEBUG_SOFTWARE_BREAKPOINT_SIZE - 1)
302 if (breakpoint->address >= address + size)
308 addr_t minAddress = std::max(breakpoint->address, address);
309 size_t toCopy = std::min(address + size,
310 breakpoint->address + DEBUG_SOFTWARE_BREAKPOINT_SIZE)
312 memcpy((uint8*)buffer + (minAddress - address),
313 breakpoint->softwareData + (minAddress - breakpoint->address),
331 addr_t address = (addr_t)_address;
341 // Get the first breakpoint -- if it starts before the address, we'll
344 = std::max(address, (addr_t)DEBUG_SOFTWARE_BREAKPOINT_SIZE - 1)
352 if (breakpoint->address >= address)
357 // beginning of the address range to write.
358 size_t toCopy = std::min(address + size,
359 breakpoint->address + DEBUG_SOFTWARE_BREAKPOINT_SIZE)
360 - address;
361 memcpy(breakpoint->softwareData + (address - breakpoint->address),
364 address += toCopy;
376 if (breakpoint->address >= address + size)
381 size_t toCopy = breakpoint->address - address;
384 status_t error = _WriteMemory(address, buffer, toCopy,
389 address += chunkWritten;
402 address += toCopy;
414 status_t error = _WriteMemory(address, buffer, size, chunkWritten);
428 const addr_t address = (addr_t)_address;
432 // Check whether there's a software breakpoint at the continuation address.
433 InstalledBreakpoint* installed = fBreakpoints.Lookup(address);
445 status_t error = _InstallHardwareBreakpoint(breakpoint, address);
476 breakpoint->installedBreakpoint, breakpoint->address);
490 addr_t address)
497 breakpoint->address = address;
504 status_t error = _ReadMemory(address, breakpoint->softwareData,
512 error = _WriteMemory(address, DEBUG_SOFTWARE_BREAKPOINT,
521 _WriteMemory(address, breakpoint->softwareData, bytesTransferred,
530 TRACE("installed software breakpoint at %#lx\n", address);
540 _WriteMemory(breakpoint->address, breakpoint->softwareData,
543 TRACE("uninstalled software breakpoint at %#lx\n", breakpoint->address);
552 addr_t address)
554 status_t error = arch_set_breakpoint((void*)address);
562 TRACE("installed hardware breakpoint at %#lx\n", address);
564 breakpoint->address = address;
573 status_t error = arch_clear_breakpoint((void*)breakpoint->address);
577 TRACE("uninstalled hardware breakpoint at %#lx\n", breakpoint->address);
586 BreakpointManager::_FindWatchpoint(addr_t address) const
590 if (address == watchpoint->address)
600 addr_t address, uint32 type, int32 length)
611 status_t error = arch_set_watchpoint((void*)address, type, length);
615 watchpoint->address = address;
632 return arch_clear_watchpoint((void*)watchpoint->address);
640 const uint8* address = (const uint8*)_address;
644 if (!CanAccessAddress(address, false))
654 // check whether we're still in user address space
655 if (!CanAccessAddress(address, false)) {
662 int32 maxRead = B_PAGE_SIZE - (addr_t)address % B_PAGE_SIZE;
666 error = user_memcpy(buffer, address, toRead);
671 address += toRead;
691 uint8* address = (uint8*)_address;
695 if (!CanAccessAddress(address, true))
705 // check whether we're still in user address space
706 if (!CanAccessAddress(address, true)) {
711 // get the area for the address (we need to use _user_area_for(), since
713 area_id area = _user_area_for(address);
716 "address: %p: %lx\n", address, area);
732 int32 maxWrite = (uint8*)areaInfo.address + areaInfo.size - address;
750 error = user_memcpy(address, buffer, toWrite);
763 address += toWrite;