[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] gdb: Add malloc and free symbols to kernel.exec to improv
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2] gdb: Add malloc and free symbols to kernel.exec to improve gdb functionality |
Date: |
Tue, 22 Mar 2022 17:49:18 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Fri, Mar 18, 2022 at 01:34:05AM -0500, Glenn Washburn wrote:
> Add linker flags when linking kernel.exec to have malloc and free point to
> grub_malloc and grub_free respectively. Some gdb functionality depends on
> gdb locating the symbols "malloc" and "free", such as dynamically creating
> strings for arguments to injected function calls. A trivial example would
> the gdb command 'p strlen("astring")'. Make sure not to do this on emu
> platforms, or an infinite loop occurs because emu has a special
> grub_malloc() that calls malloc().
>
> Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel