Beispiel #1
0
	FrameImpl::FrameImpl(void* address)
		: m_address()
		, m_module_base()
		, m_line()
		, m_offset()
	{
		TraceFunc();
		IMAGEHLP_MODULEW64 modInfo;
		memory::zero(modInfo);
		modInfo.SizeOfStruct = sizeof(modInfo) - 8;

		LogTrace(L"[%p]\n", address);
		bool res = os::Dbghelp_dll::inst().SymGetModuleInfoW64(::GetCurrentProcess(), reinterpret_cast<DWORD64>(address), &modInfo);

		if (res) {
			m_module = modInfo.ModuleName;
			m_module_base = modInfo.BaseOfImage;
			m_image = modInfo.ImageName;
			LogTrace(L"BaseOfImage:     0x%I64X\n", modInfo.BaseOfImage);
			LogTrace(L"ImageSize:       %u\n", modInfo.ImageSize);
			LogTrace(L"TimeDateStamp:   %u\n", modInfo.TimeDateStamp);
			LogTrace(L"CheckSum:        %u\n", modInfo.CheckSum);
			LogTrace(L"NumSyms:         %u\n", modInfo.NumSyms);
			LogTrace(L"SymType:         %d\n", (int)modInfo.SymType);
			LogTrace(L"ModuleName:      '%s'\n", modInfo.ModuleName);
			LogTrace(L"ImageName:       '%s'\n", modInfo.ImageName);
			LogTrace(L"LoadedImageName: '%s'\n", modInfo.LoadedImageName);
			LogTrace(L"LoadedPdbName:   '%s'\n", modInfo.LoadedPdbName);
		} else {
			LogError(L"%s %p\n", totext::api_error().c_str(), address);
		}

		(modInfo.SymType && LoadFromPDB(address)) || LoadFromBfd(address) || LoadFromMap(address);
		TraceFunc();
	}
void CShop::DisplayShop( idUserInterface *gui ) {
	const idStr &curStartingMap = gameLocal.m_MissionManager->GetCurrentStartingMap();
	idStr filename = va( "maps/%s", curStartingMap.c_str() );
	// Let the GUI know which map to load
	gui->SetStateString( "mapStartCmd", va( "exec 'map %s'", curStartingMap.c_str() ) );
	// Load the map from the missiondata class (provides cached loading)
	idMapFile *mapFile = gameLocal.m_MissionData->LoadMap( filename );
	if( mapFile == NULL ) {
		// Couldn't load map
		gui->HandleNamedEvent( "SkipShop" );
		gameLocal.Warning( "Couldn't load map %s, skipping shop.", filename.c_str() );
		return;
	}
	// Load the shop items from the map entity/entities
	LoadFromMap( mapFile );
	if( _skipShop ) {
		// Shop data says: skip da shoppe
		gui->HandleNamedEvent( "SkipShop" );
		return;
	}
	// grayman (#2376) add "inv_map_start" items to the shop's list of starting items,
	// then check for lockpick duplications.
	AddMapItems( mapFile );
	// Add items from previous missions (which are marked as persistent)
	AddPersistentStartingEquipment();
	if( _pickSetShop ) {
		CheckPicks( _itemsForSale );
	}
	if( _pickSetStarting ) {
		CheckPicks( _startingItems );
	}
	// greebo: Update the amount of gold to spend based on the loot the player found earlier
	AddGoldFromPreviousMission();
	UpdateGUI( gui );
}