Problems debugging multithreaded program wirh gdbserver via serial port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: Problems debugging multithreaded program wirh gdbserver via serial port

Hi,

  I am trying to debug a multithreaded program running on an embedded MIPS 5Kc using gdb and gdbserver, connected via

a serial port.

  My environment is as follows:

  MIPS kernel based on 2.4.18

  gdb :  6.2.1, configured with --host=i686-pc-linux-gnu --target=mips-hardhat-linux --disable-sim --disable-tcl --enable-threads --enable-shared

  gdbserver: 6.2.1, configured with --target=mips-linux --enable-threads --enable-shared

  gcc : 3.2.3,     }

  binutils : 2.13  }   Built using crosstool

  glibc: 2.2.5      }

  My problems are as follows:

1)  If I try to run the program from gdbserver (i.e. gdbserver /dev/ttyS0 wlsd), I get "readchar: Input/output error" messages,

and nothing works. See attached file gdb_fail.

What is going on here ?


2) If I first run the program, and then attach gdbserver to it (i.e. gdbserver /dev/ttyS0 --attach 80), I can debug it.

However, debugging is amazingly slow !!

For example, it can take 10 minutes for the "backtrace" (bt) command to complete !!!

Also, I get messages saying "Cannot access memory at address 0x2c" whnever I try to look at the stack.

See attached file gdb_trace.

Why is it going so slow ?

What is the cause of the "Cannot access memory at address 0x2c"  messages ?

3) If I repeat the scenario described in 2), but with "set debug remote 1", it seems to work somewhat faster

(e.g. bt takes about 1 minute to complete).

I am seeing alot of "Packet instead of Ack, ignoring it" messages.

See attached file gdb_trace_debug.

What do these messages mean ?

  In general, what to I need to do to get gdb <-> gdbserver debugging working properly over a serial port?

  Thanks in advance for any tips !!

  -Yoni

<<gdb_fail>> <<gdb_trace_debug>> <<gdb_trace>>

Attachment: gdb_fail
Description: gdb_fail

Attachment: gdb_trace_debug
Description: gdb_trace_debug

Attachment: gdb_trace
Description: gdb_trace


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux