This is the mail archive of the gdb-prs@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]
Other format: [Raw text]

win32/1825: "com1" is not a valid device for Target Remote command, use "/dev/com1" instead.


>Number:         1825
>Category:       win32
>Synopsis:       "com1" is not a valid device for Target Remote command, use "/dev/com1" instead.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 06 17:28:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Joe Bak
>Release:        gdb-6.3
>Organization:
>Environment:
Windows XP Professional, Service Pack 2
cygwin 1.5.12-1
This GDB was configured as "--host=i686-pc-cygwin --target=i386-elf".

Redboot Floppy 2.0, I386
>Description:
When the command "target remote com1" is issued to GDB, the "open" function of Cygwin appears to return without error, but subsequent calls issued to "tcgetattr" and "tcsetattr" fail with the error message "Inappropriate ioctl for device."

If the remote device name is changed from "com1" to "/dev/com1", the remote target connection functions properly.

All of the Cygwin documentation I have seen, including the "help target remote" text within GDB, lists "com1" as the correct form of the device name.
>How-To-Repeat:
Connect an X86 PC running Redboot Floppy to COM1 of a PC running GDB 6.3 under Cygwin 1.5.12-1.

At the GDB prompt type: target remote com1

Observe the error messages returned.
>Fix:
Using the setup listed in "How-To-Repeat" above, type this command at the GDB prompt: target remote /dev/com1

To correct the erroneous help text within GDB, I propose the following source code changes to "remote.c":

static void
remote_open_1 (char *name, int from_tty, struct target_ops *target,
	       int extended_p, int async_p)
{
  int ex;
  struct remote_state *rs = get_remote_state ();

  if (name == 0)
    error ("To open a remote debug connection, you need to specify what\n"
	   "serial device is attached to the remote system\n"
	   "(e.g. /dev/ttyS0, /dev/ttya, /dev/com1 (Cygwin), COM1 (DOS), etc.).");

...


static void
init_remote_ops (void)
{
  remote_ops.to_shortname = "remote";
  remote_ops.to_longname = "Remote serial target in gdb-specific protocol";

  remote_ops.to_doc =
    "Use a remote computer via a serial line, using a gdb-specific protocol.\n\
Specify the serial device it is connected to\n\
(e.g. /dev/ttyS0, /dev/ttya, /dev/com1 (Cygwin), COM1 (DOS), etc.).";

...
>Release-Note:
>Audit-Trail:
>Unformatted:


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