mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
Use uintptr_t instead of u32 when storing pointers as integers
uintptr_t is 32-bit or 64-bit depending on the target platform. This will help us write pointer size agnostic code so that when the day comes that we want to do a 64-bit port, we'll be in better shape.
This commit is contained in:
parent
e07b34b9b8
commit
a246e9cd7e
14 changed files with 110 additions and 110 deletions
|
@ -134,13 +134,13 @@ static void load_ksyms_from_data(const ByteBuffer& buffer)
|
|||
int recognized_symbol_count = 0;
|
||||
if (use_ksyms) {
|
||||
for (u32* stack_ptr = (u32*)ebp;
|
||||
(current ? current->process().validate_read_from_kernel(VirtualAddress((u32)stack_ptr), sizeof(void*) * 2) : 1) && recognized_symbol_count < max_recognized_symbol_count; stack_ptr = (u32*)*stack_ptr) {
|
||||
(current ? current->process().validate_read_from_kernel(VirtualAddress((uintptr_t)stack_ptr), sizeof(void*) * 2) : 1) && recognized_symbol_count < max_recognized_symbol_count; stack_ptr = (u32*)*stack_ptr) {
|
||||
u32 retaddr = stack_ptr[1];
|
||||
recognized_symbols[recognized_symbol_count++] = { retaddr, ksymbolicate(retaddr) };
|
||||
}
|
||||
} else {
|
||||
for (u32* stack_ptr = (u32*)ebp;
|
||||
(current ? current->process().validate_read_from_kernel(VirtualAddress((u32)stack_ptr), sizeof(void*) * 2) : 1); stack_ptr = (u32*)*stack_ptr) {
|
||||
(current ? current->process().validate_read_from_kernel(VirtualAddress((uintptr_t)stack_ptr), sizeof(void*) * 2) : 1); stack_ptr = (u32*)*stack_ptr) {
|
||||
u32 retaddr = stack_ptr[1];
|
||||
dbgprintf("%x (next: %x)\n", retaddr, stack_ptr ? (u32*)*stack_ptr : 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue