x86_64: implement switch jump tables
This commit is contained in:
@@ -121,13 +121,13 @@ pub fn deinit(self: *SelfInfo) void {
|
||||
}
|
||||
|
||||
pub fn getModuleForAddress(self: *SelfInfo, address: usize) !*Module {
|
||||
if (comptime builtin.target.isDarwin()) {
|
||||
if (builtin.target.isDarwin()) {
|
||||
return self.lookupModuleDyld(address);
|
||||
} else if (native_os == .windows) {
|
||||
return self.lookupModuleWin32(address);
|
||||
} else if (native_os == .haiku) {
|
||||
return self.lookupModuleHaiku(address);
|
||||
} else if (comptime builtin.target.isWasm()) {
|
||||
} else if (builtin.target.isWasm()) {
|
||||
return self.lookupModuleWasm(address);
|
||||
} else {
|
||||
return self.lookupModuleDl(address);
|
||||
@@ -138,13 +138,13 @@ pub fn getModuleForAddress(self: *SelfInfo, address: usize) !*Module {
|
||||
// This can be called when getModuleForAddress fails, so implementations should provide
|
||||
// a path that doesn't rely on any side-effects of a prior successful module lookup.
|
||||
pub fn getModuleNameForAddress(self: *SelfInfo, address: usize) ?[]const u8 {
|
||||
if (comptime builtin.target.isDarwin()) {
|
||||
if (builtin.target.isDarwin()) {
|
||||
return self.lookupModuleNameDyld(address);
|
||||
} else if (native_os == .windows) {
|
||||
return self.lookupModuleNameWin32(address);
|
||||
} else if (native_os == .haiku) {
|
||||
return null;
|
||||
} else if (comptime builtin.target.isWasm()) {
|
||||
} else if (builtin.target.isWasm()) {
|
||||
return null;
|
||||
} else {
|
||||
return self.lookupModuleNameDl(address);
|
||||
|
||||
Reference in New Issue
Block a user