Virtualbox + kgdb: Can't see vmlinux symbols

Kamran Khan krkhan at inspirated.com
Fri Jun 16 21:21:00 EDT 2017


Disabling CONFIG_RANDOMIZE_MEMORY did not help. Disabled
CONFIG_RANDOMIZE_BASE as well and the symbols came up.

The weird thing is that CONFIG_RANDOMIZE_BASE is enabled on Xenial
(4.4) kernel as well, but somehow having it enabled on Zesty (4.10)
kernel throws off kgdb.

Thanks,
Kamran.

On Fri, Jun 16, 2017 at 3:02 PM, Kamran Khan <krkhan at inspirated.com> wrote:
> The debug symbols are on for all of them, and gdb *does* load the
> symbols. I have a suspicion that KASLR that was introduced around 4.7
> might be the culprit here. CONFIG_RANDOMIZE_MEMORY is an option that's
> not present in the Xenial config.
>
> Anyone here has attached kgdb to 4.8/4.10?
>
> Thanks,
> Kamran.
>
> On Fri, Jun 16, 2017 at 1:41 PM,  <valdis.kletnieks at vt.edu> wrote:
>> On Fri, 16 Jun 2017 13:24:58 -0700, Kamran Khan said:
>>> This is happening only with kernel 4.8+.
>>>
>>> When I compile kernel 4.4 with a stock Ubuntu Xenial .config, symbols
>>> appear just fine.
>>>
>>> When I compile kernel 4.8/4.10 with Yakkety/Zesty stock configs the
>>> symbols disappear.
>>
>> What happens when you try to compile 4.8/r.10 with a Xenial .config?
>>
>> I'm willing to bet the problem is that the Xenial config turns on symbols
>> and Yakkety/Zesty disable them by default.
>>
>> See these for further info:
>>
>> CONFIG_DEBUG_INFO=y
>> CONFIG_DEBUG_INFO_REDUCED=y
>> CONFIG_DEBUG_INFO_SPLIT=y
>>
>> It appears that you'll need DEBUG_INFO_REDUCED=n for kgdb to work properly.



More information about the Kernelnewbies mailing list