/srv/irclogs.ubuntu.com/2016/06/27/#ubuntu-kernel.txt

=== bguthro__ is now known as bguthro
=== willcooke_ is now known as willcooke
i915is there away in ubuntu to enable kernel debugging kdb ? If so how do you run it 17:31
i915I just am curious if ubuntu's kernel enables this feature or does it take a recompiling to uses on ubuntu17:32
apwi915, yes we have kgdb enabled in the kernle17:34
i915how does one execute this17:34
i915or get the kernel debugger to run on apt-get i have downloaded before the kgdb package but it was just a front end gui like DDD for gdb. Couldn't get it to run or do anything with the kernel like set breakpoints ,..etc17:35
apwnormally you need to talk to the kernel like over a serial console17:37
apwor a network console, so you are talking to it from "outside"17:37
apwto debug from inside you usually use ftrace and family17:37
i915What i want to do is step thru the kernel code first locally thru the asm . I know if i want to debug kernel with c language code showing i will need to recompile the DWARF in but thats for later trying now just to focus on setting up kgb to attach to the kernel and set a break point to step thru the asm code17:37
apwright so you need to do that from outside17:38
i915i cann't run a debugger on the same computer and attach to the kernel vmlinuz directly or set a break point in memory at  01000000-01660531 : Kernel code17:39
i915  01660532-019b3e7f : Kernel data17:39
i915  01a96000-01b7cfff : Kernel bss17:39
i915  17:39
apwwhat would it run "on" if the kernel is stopped waiting for you17:40
i915from user mode gdb allows me to attach to any ps -A process pretty much so i was assuming you could just find the  function in kallsyms and attach from there17:40
apwi915, but a userspace process has somewhere to run separatly from your gdb17:41
apwyou are asking to stop the entire kernel, to do that you need to do it from somewhere that isn't under the control of the kernel17:41
apwwhich is why mostly we debug using ftrace as you can do that from inside17:41
i915O will its not built in to the kernel that the debug registers would have a seperate kernel debugger program that ran with the kernel... now i am confused about how remotely debugging would work the kernel would still break so there has to be an external kernel program to send it remotely and step thru the kernel itself17:42
apwthere is a shim in the tty code which is very very thin which can control the kernel17:43
apwi think you need to go read some background on how this stuff works, there must be google resources on this17:44
i915like a gdbserver program equivalent running at kernel level ... and if that was the case why couldn't it just print to the local monitor instead 17:44
apwthat isn't really how things work, it is not impossible it could, but i don't beleive it does17:45
apwit isn't something people actually do very often17:45
apwso you'd not want to dedicate space for such a thing17:45
i915Also i have seen it done where somebody presses a special sysrq key in there terminal and it goes to a blue screen kdb debugger how is that working or setup because it looks like it debugs the kernel on userland?17:46
i915Ok if i do it remotely where do you configure the remote settings to add a remote 192.168.1.102:7893 so that i can have my remote machine talk to this debugging network service17:47
i915I would imagine in grub 17:47
apwi915, i would imagine on the kenrel command line indeed17:48
i915because its got to run as soon as the kernel is booting from grub17:48
apwnot something i have done in a very long time17:48
i915ok i am just going to stick with virtual machine kernel debugging until i can figure out how to get it on the bare hardware to run remote kernel debugging. My problem is now getting grub to boot the kernel into a workable os... i always get kernel opps for initrd or init process issues or the extra stuff the kernel needs to boot workable... but i have everything where it should be so confused still working thru that issue.. onc18:00
i915e i get that issue taken care of i think i will beable to set up kernel debugging thru serial or network tcp/ip just thru settings in grub or the bootloader18:00
cyphermoxI'm trying to run an install from a yakkety server daily iso; modprobe -v usb-modeswitch complains that the key is not available -- did we somehow break loading all modules, fail to sign stuff for the udebs, and is that a known issue?20:57
=== mwhudson_ is now known as mwhudson
apwudebs may well not be signed ...22:07
apwthat sounds like a problem22:08
apwwill think about that tommorrow22:08
i915i915 is the kernel driver for the graphics card but now it is also the driver that the /dev/fb0 uses i can uses fbset to set the mode and configuration for /dev/fb0 ...so kind of wondering if this settings going to affect my X11 env or other graphical env i thought /believe /dev/fb0 is used by X11 as well23:37
mjg59i915: No, X doesn't use the framebuffer interface (unless you're using the fbdev driver)23:53
mjg59i915: the drm layer exposes its own modesetting interface that X uses23:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!