This is the mail archive of the gdb@sources.redhat.com 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]

AGAIN: gdbserver + serial link, status + runtime fix


There was error in my latest email,
VALID FIX in remote_open() function in remote_utils.c (rev.1.7) file:

/* Open a connection to a remote debugger.
   NAME is the filename used for communication.  */

void
remote_open (char *name)
{
  int save_fcntl_flags;

  if (!strchr (name, ':'))
    {
      remote_desc = open (name, O_RDWR);
      if (remote_desc < 0)
	perror_with_name ("Could not open remote device");

#ifdef HAVE_TERMIOS
      {
	struct termios termios;
	tcgetattr (remote_desc, &termios);

	termios.c_iflag = 0;
	termios.c_oflag = 0;
	termios.c_lflag = 0;
	termios.c_cflag &= ~(CSIZE | PARENB);
	termios.c_cflag |= CLOCAL | CS8;
	termios.c_cc[VMIN] = 1;
	termios.c_cc[VTIME] = 0;

+         cfsetospeed(&termios, B115200);
+         cfsetispeed(&termios, B115200);

	tcsetattr (remote_desc, TCSANOW, &termios);

      }
#endif

HOST SIDE:
we also need use "set remotebaud 115200" in HOST PC.
and "target remote com?" to connect to remote target.
SERVER SIDE:
"gdbserver /dev/ttyS? path/image"

----------------------------------------------------------------------------
----------
Michal Korbel - Software engineer
Intel Technology Poland Sp. z o.o.; ul. Slowackiego 173; 80-298 Gdansk
tel. +48 58 34-81-726; fax: +48 58 34-81-505; mobile:+48 603-203-142 
----------------------------------------------------------------------------
----------

Hi,
GDBSERVER not work properly with serial link, the baudrate parameter is not
set.
I was add two lines in remote_open file in remote_utils.c file
and gdbserver work properly with 115200 baudrate:
	termios.c_cc[VMIN] = 1;
	termios.c_cc[VTIME] = 0;

	tcsetattr (remote_desc, TCSANOW, &termios);

+	cfsetospeed(&termios, B115200);
+	cfsetispeed(&termios, B115200);
      }
#endif

I think we need more serial link description:
for TCP/IP we use	gdbserver IP_ADDRESS:PORT_ID path/image
for serial link	gdbserver
/dev/ttyS?,speed,data_bits,parity_control,stop_bits path/image
when someone not write serial link parameter we can use dafault parameter:
115200,8,N,1

for first serial link with speed = 115200 with 8 data bits and no parity
control and 1 stop bits we can write:
"gdbserver /dev/ttyS0,115200,8,N,1 path/image" or "gdbserver /dev/ttyS0
path/image" when use defaults.

Below we have runtime fix for run gdbserver with serial link usage without
any changes:
1) We need properly configure serial link in any aplication (I was use
mincom),
2) Next we need start "gdbserver /dev/ttyS? <#image_path>/image" (/dev/ttyS?
meaning serial link ID).
3) When gdbserver start properly we need kill mincom aplication (NOT EXIT).

----------------------------------------------------------------------------
----------
Michal Korbel - Software engineer
Intel Technology Poland Sp. z o.o.; ul. Slowackiego 173; 80-298 Gdansk
tel. +48 58 34-81-726; fax: +48 58 34-81-505; mobile:+48 603-203-142 
----------------------------------------------------------------------------
----------



-----Original Message-----
From: Korbel, Michal 
Sent: Tuesday, August 14, 2001 9:07 AM
To: 'atai@atai.org'; gdb@sources.redhat.com
Subject: RE: gdb's 32-thread limit


Hi,
The fix for 32-thread limit was done by Kevin Buettner in 2001-05-03.
You need try snapshot version after this date, or you can try
GDB 5.1 ( CVS TAG : gdb_5_1-2001-07-29-branchpoint ).

----------------------------------------------------------------------------
----------
Michal Korbel - Software engineer
Intel Technology Poland Sp. z o.o.; ul. Slowackiego 173; 80-298 Gdansk
tel. +48 58 34-81-726; fax: +48 58 34-81-505; mobile:+48 603-203-142 
----------------------------------------------------------------------------
----------



-----Original Message-----
From: Andy Tai [mailto:lichengtai@yahoo.com]
Sent: Tuesday, August 14, 2001 5:31 AM
To: gdb@sources.redhat.com
Cc: atai@atai.org
Subject: gdb's 32-thread limit


Hi, gdb had a 32-thread limit.  I heard that this
limit has been lifted in the current version in CVS. 
I tried the snapshot from Aug 8 and that limit still
seemed to be there.  Is there anything I need to do to
configure the recent gdb snapshots to support
debugging more than 32 threads?  Thanks for any info.



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


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