This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/19841] remote debug via serial port not successful


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]