lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CAE5B40.3070701@windriver.com>
Date:	Thu, 07 Oct 2010 18:44:00 -0500
From:	Jason Wessel <jason.wessel@...driver.com>
To:	Elvis Dowson <elvis.dowson@....com>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linux OMAP Mailing List <linux-omap@...r.kernel.org>
Subject: Re: kgdb errors with serial console

On 10/07/2010 06:07 PM, Elvis Dowson wrote:
> On Oct 8, 2010, at 2:37 AM, Jason Wessel wrote:
>
>   
>> It would probably also be good to test if the debugger is working at all
>> on your serial port.
>>
>> Configure the debugger with:
>> # echo ttyS2 > /sys/module/kgdboc/parameters/kgdboc
>> kgdb: Registered I/O driver kgdboc.
>> # echo g > /proc/sysrq-trigger
>> SysRq : DEBUG
>>
>> And now to exit debugger you must blindly and perfectly type
>> $D#44+
>>
>> Nothing will be echoed because at this stage the kernel serial polling
>> driver would just be collecting characters.
>>
>> After typing that the kernel should return back to the running state and
>> print something like:
>> +$OK#9a#
>>     
>
> Cool, I tried all the commands that you suggested and it worked perfectly. I got the same outputs. 
>
> So, if I understand correctly, I boot into the kernel without the kgbdwait option, and then manually launch the kgdb and then connect from Eclipse using gdb.
>
> The system waits at the root login prompt. 
>   

Probably just set a break point at sys_sync.

Of course if you are willing to try something a bit more complex you can
probably make use of being able to interactively break in with the
eclipse gdb plugin, assuming your serial port is connected to a linux
host, and it appeared that way based on your description.

On your host you could set up the following:


git clone git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
cd agent-proxy
make
./agent-proxy 4440^4441 0 /dev/ttyUSB0,115200 &

telnet localhost 4440

Now in your gdbinit file you replace the target remote with

target remote localhost:4441

The agent proxy should take care of sending the sysrq g for you, and the
telnet window will provide you a look at the target console.

Jason.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ