Citando joaoandrefe...@sapo.pt:
> Citando Frank Rowand <frowand.l...@gmail.com>:
>
>> On 10/7/2014 1:27 PM, Frank Rowand wrote:
>>> On 10/7/2014 12:00 PM, joaoandrefe...@sapo.pt wrote:
>>>> Citando Frank Rowand <frowand.l...@gmail.com>:
>>>>
>>>>> On 10/7/2014 4:04 AM, joaoandrefe...@sapo.pt wrote:
>>>>>
>>>>> < snip >
>>>>>
>>>>>>
>>>>>> Hello again,
>>>>>>
>>>>>> Just one more doubt, regarding kdmx: after researching a little bit,
>>>>>> I need to confirm that I indeed need to use it, since that in the
>>>>>> cases I've found the setup seemed different from mine (sharing a
>>>>>> serial port among GDB / KGDB). I have two different physical machines
>>>>>> (target and host), each one with its own physical serial port, and a
>>>>>> RS-232 cable making the connection between them (I think this is the
>>>>>> "classic" setup). Sorry for insisting but this doubt arose
>>>>>> yesterday.
>>>>>>
>>>>>> In the case I really need to use kdmx, following the instructions you
>>>>>> kindly pointed me (http://elinux.org/Kgdb), in the link to Git
>>>>>> provided there
>>>>>> (git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git/) I
>>>>>> can't seem to find the kdmx files. However, accessing the link above
>>>>>> (strikethrough), I'm able to download a kdmx tar.gz. However,
>>>>>> following the instructions in the README-KDMX.txt file, I'm having no
>>>>>> luck:
>>>>>>
>>>>>> $ sudo make make:
>>>>>> `kdmx' is up to date.
>>>>>> $ sudo ./kdmx -h
>>>>>> ./kdmx: ./kdmx: cannot execute binary file
>>>>>
>>>>> You should not be using sudo. You do not need superuser capabilities
>>>>> to use kdmx. If the serial port you are using requires you to be
>>>>> superuser to access it then you should instead modify the permissions
>>>>> on the serial port or add your user to the group that has permissions
>>>>> on the serial port.
>>>>>
>>>>> Get rid of the pre-built kdmx:
>>>>> make clean
>>>>>
>>>>> (or if that does not work: rm kdmx)
>>>>>
>>>>> The compile kdmx:
>>>>> make
>>>>>
>>>>> Then print help:
>>>>> ./kdmx -h
>>>>
>>>> Even after reading the help, I'm not 100% sure whether I should
>>>> run kdmx on
>>>> the target (KGDB) or on the host (GDB). It seems to me it is
>>>> meant to be run
>>>> on the target, but if I run it there (after resuming the target
>>>> kernel boot,
>>>
>>> Run kdmx on the host.
>>
>> Here is an example, where I am using a USB serial port to connect between
>> my host and target. I did all of the commands in "host window 1" before
>> I did the commands in "host window 2". I did all of the commands in
>> "host window 2" before I did the commands in "host window 3".
>>
>>
>> ---------------------- HOST
>> -------------------------------------- --- TARGET
>> ---
>>
>> terminal <----> /dev/pty/29 <----> +------+
>> emulator | |
>> | kdmx | <----> serial port
>> <== cable ==> target console
>> gdb <---------> /dev/pty/53 <----> | | /dev/ttyUSB0
>> +------+
>>
>>
>>
>> ----- host window 1 - kdmx -----
>>
>> $ export PS1='[1]: '
>> [1]: ./kdmx -n -d -p/dev/ttyUSB0 -b115200
>> serial port: /dev/ttyUSB0
>> Initalizing the serial port to 115200 8n1
>> /dev/pts/29 is slave pty for for terminal emulator
>> /dev/pts/53 is slave pty for gdb
>>
>>
>> ----- host window 2 - terminal emulator -----
>> # In this example, I am using the sysrq debug command instead of the
>> # kernel command line 'kgdbwait' option to enter kgdb
>>
>> $ export PS1='[2]: '
>> [2]: minicom -o -w -p /dev/pts/29
>>
>> # Now in minicom, connected to the target console.
>> # CONFIG_PRINTK_TIME=y, so timestamps will be added to
>> # printk() messages to the console.
>>
>> $ export PS1='% '
>> % cat /proc/version
>> Linux version 3.17.0-dirty (frank@ussvlx) (gcc version 4.6.x-google
>> 20120106 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Oct 6 10:19:37 PDT
>> 2014
>> % echo g >/proc/sysrq-trigger
>> [ 24.246292] SysRq : DEBUG
>> [ 24.247184] Entering KGDB
>>
>>
>> ----- host window 3 - gdb -----
>> # current directory is the root of the kernel source tree
>>
>> $ export PS1='[3]: '
>> [3]: hostname
>> ussvlx
>> [3]: whoami
>> frank
>> [3]: pwd
>> /xxx/git_linus/linux--3.17
>> [3]: echo $KBUILD_OUTPUT
>> ../build/dragon_linus_3.17
>> [3]: strings $KBUILD_OUTPUT/vmlinux | grep "^Linux version"
>> Linux version 3.17.0-dirty (frank@ussvlx) (gcc version 4.6.x-google
>> 20120106 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Oct 6 10:19:37 PDT
>> 2014
>> Linux version
>> [3]: gdb $KBUILD_OUTPUT/vmlinux
>> GNU gdb (GDB) 7.3.1-gg2
>> Copyright (C) 2011 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later
>> <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "--host=x86_64-linux-gnu
>> --target=arm-linux-android".
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/>...
>> Reading symbols from /xxx/git_linus/build/dragon_linus_3.17/vmlinux...done.
>> (gdb) target remote /dev/pts/53
>> Remote debugging using /dev/pts/53
>> kgdb_breakpoint ()
>> at /xxx/git_linus/linux--3.17/kernel/debug/debug_core.c:1050
>> 1050 arch_kgdb_breakpoint();
>> (gdb) b sys_sync
>> Breakpoint 1 at 0xc031d450: file
>> /xxx/git_linus/linux--3.17/fs/sync.c, line 103.
>> (gdb) c
>> Continuing.
>>
>
> What a great clarification, Frank. However, I'm having trouble (at
> least) with minicom. I've never used it, so I've installed, created
> the configuration file with "minicom -s" and changed the "serial
> port setup" -> "serial device" option to /dev/ttyS0
>
>>> Host window #1 (kdmx):
>
> $ ./kdmx -n -d -p /dev/ttyS0 -b 115200
> serial port: /dev/ttyS0
> Initalizing the serial port to 115200 8n1
> /dev/pts/1 is slave pty for for terminal emulator
> /dev/pts/3 is slave pty for gdb
>
> (now I removed "kgdbwait" from the boot configuration file, to allow
> the target system to boot till the end without needing to send the
> "cont" command from GDB, and the I rebooted the target)
>
>>> Host window #2 (minicom):
>
> $ minicom -o -w -p /dev/pts/1
> Welcome to minicom 2.3
>
> OPTIONS: I18n
> Compiled on Aug 19 2010, 05:48:57.
> Port /dev/ttyS0
>
> Press CTRL-A Z for help on special keys
>
>
> So, it seems minicom is initialized correctly, however despite
> seeing the cursor of the terminal, if I try to insert commands on it
> nothing will change / happen (I can't even see the commands I'm
> trying to type appearing in the screen). Pressing CTRL+A Z brings me
> the menu with options, but after trying almost all of them and
> searching for minicom tutorials online, I'm not progressing on this.
> Sorry for this (another) rookie doubt, I'm also on a race against
> time but I can't seem to figure this out.
(Some kind of) update on the minicom part: I found people with a
similar problem, here:
http://ubuntuforums.org/showthread.php?t=1112330. However, even after
applying the changes mentioned there (changing hardware and software
flow control settings, under the "serial port setup" option, I'm still
unable to write anything on the console. I've tried with hardware as
"no" and software as "no", but also hardware as "no" and software as
"yes". I even changed the serial device from "/dev/ttyS0" to
"/dev/pts/1", tried the same flow control settings combinations, with
no success. However, one thing I've noticed in that thread is that
people who are complaining about the same issue have some kind of
automatic message (for instance "AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0")
printed in the console. I don't have that, as can be seen in the
output above. Also, the text on the green bar at tyhe bottom of the
console says I'm offline, which of course must be related (in detail,
it says "CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.3 | VT102
| Offline"). I'll be searching more on this and let you know any
improvement. Thanks.
>
>>> Host window #3 (GDB):
>
> GDB seemed to be running good before (using kdmx, when connecting
> directly to /dev/ttyS0), now is giving the errors below.
>
> (at kernel source tree):
>
> $ gdb /boot/vmlinux
> GNU gdb (GDB) Red Hat Enterprise Linux (7.2-64.el6_5.2)
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-redhat-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /boot/vmlinux...done.
> (gdb) set remotebaud 115200
> (gdb) target remote /dev/pts/3
> Remote debugging using /dev/pts/3
> Ignoring packet error, continuing...
> warning: unrecognized item "timeout" in "qSupported" response
> Ignoring packet error, continuing...
>
>
> Many, many thanks.
> João
>
>>
>>>
>>>
>>>> of course), I 'll have as output something like:
>>>>
>>>> /dev/pts/1 is slave pty for for terminal emulator
>>>> /dev/pts/2 is slave pty for gdb
>>>>
>>>> Next, in the host machine, if I try to connect GDB to /dev/pts/2,
>>>> I'll have:
>>>>
>>>> (gdb) target remote /dev/pts/2
>>>> Remote debugging using /dev/pts/2
>>>> Ignoring packet error, continuing...
>>>> warning: unrecognized item "timeout" in "qSupported" response
>>>> Ignoring packet error, continuing...
>>>>
>>>> What am I doing wrong?
>>>>
>>>> Again, thanks for everything.
>>>> João
>>>>
>>>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport