mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:12:44 +00:00 
			
		
		
		
	 60d6137e73
			
		
	
	
		60d6137e73
		
	
	
	
	
		
			
			This removes all the hard-coded kernel base addresses from userspace tools. One downside for this is that e.g. Profiler no longer uses a different color for kernel symbols when run as a non-root user.
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			521 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			521 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/String.h>
 | |
| #include <LibDebug/DebugInfo.h>
 | |
| 
 | |
| namespace Symbolication {
 | |
| 
 | |
| struct Symbol {
 | |
|     FlatPtr address { 0 };
 | |
|     String name {};
 | |
|     u32 offset { 0 };
 | |
|     Vector<Debug::DebugInfo::SourcePosition> source_positions;
 | |
| };
 | |
| 
 | |
| Optional<FlatPtr> kernel_base();
 | |
| Vector<Symbol> symbolicate_thread(pid_t pid, pid_t tid);
 | |
| Optional<Symbol> symbolicate(String const& path, FlatPtr address);
 | |
| 
 | |
| }
 |