mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	Emulator: Restrict library name check when querying symbols
Libraries in /usr/lib currently only end in .so, so no contains() is needed for now.
This commit is contained in:
		
							parent
							
								
									6c6381408f
								
							
						
					
					
						commit
						d350d2dfce
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -432,7 +432,7 @@ Optional<Emulator::SymbolInfo> Emulator::symbol_at(FlatPtr address) | ||||||
|     auto lib_name = address_region->lib_name(); |     auto lib_name = address_region->lib_name(); | ||||||
|     auto const* first_region = (lib_name.is_null() || lib_name.is_empty()) ? address_region : first_region_for_object(lib_name); |     auto const* first_region = (lib_name.is_null() || lib_name.is_empty()) ? address_region : first_region_for_object(lib_name); | ||||||
|     VERIFY(first_region); |     VERIFY(first_region); | ||||||
|     auto lib_path = lib_name.contains(".so"sv) ? String::formatted("/usr/lib/{}", lib_name) : lib_name; |     auto lib_path = lib_name.ends_with(".so"sv) ? String::formatted("/usr/lib/{}", lib_name) : lib_name; | ||||||
| 
 | 
 | ||||||
|     auto it = m_dynamic_library_cache.find(lib_path); |     auto it = m_dynamic_library_cache.find(lib_path); | ||||||
|     auto const& elf = it->value.debug_info->elf(); |     auto const& elf = it->value.debug_info->elf(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Schumacher
						Tim Schumacher