This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/19841] remote debug via serial port not successful
- From: "sugunpradeep at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 23 Mar 2016 16:44:18 +0000
- Subject: [Bug gdb/19841] remote debug via serial port not successful
- Auto-submitted: auto-generated
- References: <bug-19841-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19841
--- Comment #2 from sugun karanam <sugunpradeep at gmail dot com> ---
(In reply to Pedro Alves from comment #1)
> I'm not really sure what you're saying doesn't work. Are you saying that
> gdb is outputting "set debug remote 1" and "set debug serial 1" logs, while
> you didn't enable them?
>
> I tried the following on GNU/Linux, with current gdb master:
>
> $ socat -d -d pty,raw,echo=0 pty,raw,echo=0
> 2016/03/23 10:44:41 socat[29723] N PTY is /dev/pts/6
> 2016/03/23 10:44:41 socat[29723] N PTY is /dev/pts/7
> 2016/03/23 10:44:41 socat[29723] N starting data transfer loop with FDs
> [3,3] and [5,5]
>
> $ gdbserver /dev/pts/6 ~/gdb/tests/threads
> Process /home/pedro/gdb/tests/threads created; pid = 29831
> Remote debugging using /dev/pts/6
>
> $ gdb -ex "target remote /dev/pts/7"
> GNU gdb (GDB) 7.11.50.20160321-git
> ...
> 0x00007ffff7ddcc80 in _start () from target:/lib64/ld-linux-x86-64.so.2
> (gdb) b main
> Breakpoint 1 at 0x40076e: file threads.c, line 54.
> (gdb) c
> Continuing.
>
> Breakpoint 1, main () at threads.c:54
> 54 long i = 0;
> (gdb)
>
>
> Those logs show gdb output mixed up with serial output, which do look odd.
> Are you sure /dev/ttyS0 is the correct port, and, you don't have some crazy
> loopback set up ?
==============
I was trying to debug my application by starting it with the gdbserver
similarly like you did on the remote target via serial port.
$ gdbserver /dev/ttyS0 my-application
and when I start "target remote /dev/ttyS0" on the host I got this output which
I did not understand. I might have assigned the "set debug remote 1" and "set
debug serial 1" in the experimental process but the result was that I was not
able to assign any breakpoints.
But instead of starting the application if I try to attach a running
application, I could successfully debug the application - apply breakpoints..
etc.
I did not understand why I could not start the application with gdbserver to
debug it.
==================
--
You are receiving this mail because:
You are on the CC list for the bug.