Skip to content

Commit

Permalink
Fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
mariapana committed Aug 1, 2024
1 parent 36924d8 commit 51f18fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions content/blog/2024-08-01-gsoc-multiboot2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ For the purpose of debugging, I needed the `.module` files.
Obviously, the first module I looked into was `relocator.module`.
I then needed to determine the base address where I had added my breakpoint.
The plan was to:

- print the address of the function using `__builtin_return_address(0)`
- object dump the module to find the offset of the function
- get the base address by substracting the offset from the address

Pretty straightforward, right?
Normally, yes.
But here...
But here?
Well, not quite.
After performing this process with the printed address, `gdb` was showing code from `malloc_in_range` instead of `grub_relocator_alloc_chunk_align`.
Additionally, it did not match the assembly (which was an infinite loop with a dummy value).
Expand All @@ -77,7 +78,7 @@ But after the preprocessor replaced the call with the definition including `grub
The backtrace also revealed the culprit for the "out of memory" error: the `grub_relocator32_boot` function had been called earlier with a null relocator.
To see when the relocator changed to null, I set a watchpoint, which quickly indicated the obstacle and allowed for an easy fix.

Drumroll, please...
Drumrolls, please!
Ladies and gentlemen, we successfully booted into Unikraft! 🎉

## Monkey see, Monkey do
Expand Down

0 comments on commit 51f18fc

Please sign in to comment.