public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* RFC: patch for insight & target stdin
@ 2005-05-10 20:46 James Lemke
  2005-05-11 14:01 ` Fernando Nasser
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: James Lemke @ 2005-05-10 20:46 UTC (permalink / raw)
  To: insight

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

I had a customer complaint about insight, that target programs could
write to stdout but not read from stdin.  On Linux, stdout went to the
console window and stdin came from the launch shell.  On Windows stdout
went to the console window and stdin just failed with EBADF.

Apparently this was never implemented, so I made an attempt.  Reads from
stdin now come from the console window.  This has been tested with
x86-linux x xscale-elf and cygwin x xscale-elf.

I don't know gdb / gdbtk implementation well, so I'm open to comments.

Jim.

-- 
James Lemke   jim@wasabisystems.com   Orillia, Ontario
http://www.wasabisystems.com

[-- Attachment #2: fsf-trunk-gdbtk.patch --]
[-- Type: text/x-patch, Size: 4354 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/ChangeLog,v
retrieving revision 1.362
diff -u -p -r1.362 ChangeLog
--- ChangeLog	28 Apr 2005 23:45:06 -0000	1.362
+++ ChangeLog	10 May 2005 20:13:42 -0000
@@ -1,3 +1,10 @@
+2005-05-10  James Lemke  <jim@wasabisystems.com>
+
+	* generic/gdbtk-hooks.c (gdbtk_fileopenin, gdbtk_read): New functions
+	for target to read stdin from console window.
+	* generic/gdbtk-interp.c (_stdtargin): Added.
+	* generic/gdbtk.h (gdbtk_fileopenin): Add declaration.
+
 2005-04-28  Ben Elliston  <bje@au.ibm.com>
 
 	* generic/gdbtk-interp.c (gdbtk_interpreter_exec): Return struct
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.39
diff -u -p -r1.39 gdbtk-hooks.c
--- generic/gdbtk-hooks.c	13 Dec 2004 20:42:20 -0000	1.39
+++ generic/gdbtk-hooks.c	10 May 2005 20:13:42 -0000
@@ -105,6 +105,7 @@ static void gdbtk_set_hook (struct cmd_l
  * See note there for details.
  */
 
+long gdbtk_read (struct ui_file *, char *, long);
 void gdbtk_fputs (const char *, struct ui_file *);
 static int gdbtk_load_hash (const char *, unsigned long);
 
@@ -220,6 +221,14 @@ gdbtk_two_elem_cmd (cmd_name, argv1)
 }
 
 struct ui_file *
+gdbtk_fileopenin (void)
+{
+  struct ui_file *file = ui_file_new ();
+  set_ui_file_read (file, gdbtk_read);
+  return file;
+}
+
+struct ui_file *
 gdbtk_fileopen (void)
 {
   struct ui_file *file = ui_file_new ();
@@ -227,6 +236,42 @@ gdbtk_fileopen (void)
   return file;
 }
 
+/* This handles input from the gdb console.
+ */
+
+long
+gdbtk_read (struct ui_file *stream, char *buf, long sizeof_buf)
+{
+  int result;
+  size_t actual_len;
+
+  if (stream == gdb_stdtargin)
+    {
+      result = Tcl_Eval (gdbtk_interp, "gdbtk_console_read");
+      if (result != TCL_OK)
+	{
+	  report_error ();
+	  actual_len = 0;
+	}
+      else
+        actual_len = strlen (gdbtk_interp->result);
+
+      /* Truncate the string if it is too big for the caller's buffer.  */
+      if (actual_len >= sizeof_buf)
+	actual_len = sizeof_buf - 1;
+      
+      memcpy (buf, gdbtk_interp->result, actual_len);
+      buf[actual_len] = '\0';
+      return actual_len;
+    }
+  else
+    {
+      errno = EBADF;
+      return 0;
+    }
+}
+
+
 /* This handles all the output from gdb.  All the gdb printf_xxx functions
  * eventually end up here.  The output is either passed to the result_ptr
  * where it will go to the result of some gdbtk command, or passed to the
Index: generic/gdbtk-interp.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-interp.c,v
retrieving revision 1.6
diff -u -p -r1.6 gdbtk-interp.c
--- generic/gdbtk-interp.c	28 Apr 2005 23:45:07 -0000	1.6
+++ generic/gdbtk-interp.c	10 May 2005 20:13:42 -0000
@@ -43,6 +43,7 @@ struct gdbtk_interp_data
   struct ui_file *_stderr;
   struct ui_file *_stdlog;
   struct ui_file *_stdtarg;
+  struct ui_file *_stdtargin;
 };
 
 static struct gdbtk_interp_data *gdbtk_data;
@@ -83,6 +84,7 @@ gdbtk_interpreter_resume (void *data)
   gdb_stderr = d->_stderr;
   gdb_stdlog = d->_stdlog;
   gdb_stdtarg = d->_stdtarg;
+  gdb_stdtargin = d->_stdtargin;
 
   deprecated_command_loop_hook = gdbtk_command_loop;
 
@@ -172,6 +174,7 @@ _initialize_gdbtk_interp (void)
   gdbtk_data->_stderr = gdbtk_fileopen ();
   gdbtk_data->_stdlog = gdbtk_fileopen ();
   gdbtk_data->_stdtarg = gdbtk_fileopen ();
+  gdbtk_data->_stdtargin = gdbtk_fileopenin ();
   gdbtk_interp = interp_new ("insight", gdbtk_data, cli_out_new (gdbtk_data->_stdout),
 			     &procs);
   interp_add (gdbtk_interp);
Index: generic/gdbtk.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.h,v
retrieving revision 1.9
diff -u -p -r1.9 gdbtk.h
--- generic/gdbtk.h	25 Jun 2004 19:44:22 -0000	1.9
+++ generic/gdbtk.h	10 May 2005 20:13:42 -0000
@@ -159,6 +159,7 @@ extern int gdbtk_two_elem_cmd (char *, c
 extern int target_is_native (struct target_ops *t);
 extern void gdbtk_fputs (const char *, struct ui_file *);
 extern struct ui_file *gdbtk_fileopen (void);
+extern struct ui_file *gdbtk_fileopenin (void);
 extern int gdbtk_disable_fputs;
 
 #ifdef _WIN32

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-10 20:46 RFC: patch for insight & target stdin James Lemke
@ 2005-05-11 14:01 ` Fernando Nasser
  2005-05-11 14:10   ` Dave Korn
  2005-05-11 14:21   ` James Lemke
  2005-05-17 13:23 ` James Lemke
  2005-05-24 18:43 ` James Lemke
  2 siblings, 2 replies; 15+ messages in thread
From: Fernando Nasser @ 2005-05-11 14:01 UTC (permalink / raw)
  To: James Lemke; +Cc: insight

Hi Jim,

The reason I left this out was because it breaks on Windows (Cygwin), at 
least the code I had at the time broke with the Cygwin of that time...

We need someone to test this on a Windows machine and see what happens.

Cheers,
Fernando


James Lemke wrote:
> I had a customer complaint about insight, that target programs could
> write to stdout but not read from stdin.  On Linux, stdout went to the
> console window and stdin came from the launch shell.  On Windows stdout
> went to the console window and stdin just failed with EBADF.
> 
> Apparently this was never implemented, so I made an attempt.  Reads from
> stdin now come from the console window.  This has been tested with
> x86-linux x xscale-elf and cygwin x xscale-elf.
> 
> I don't know gdb / gdbtk implementation well, so I'm open to comments.
> 
> Jim.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/ChangeLog,v
> retrieving revision 1.362
> diff -u -p -r1.362 ChangeLog
> --- ChangeLog	28 Apr 2005 23:45:06 -0000	1.362
> +++ ChangeLog	10 May 2005 20:13:42 -0000
> @@ -1,3 +1,10 @@
> +2005-05-10  James Lemke  <jim@wasabisystems.com>
> +
> +	* generic/gdbtk-hooks.c (gdbtk_fileopenin, gdbtk_read): New functions
> +	for target to read stdin from console window.
> +	* generic/gdbtk-interp.c (_stdtargin): Added.
> +	* generic/gdbtk.h (gdbtk_fileopenin): Add declaration.
> +
>  2005-04-28  Ben Elliston  <bje@au.ibm.com>
>  
>  	* generic/gdbtk-interp.c (gdbtk_interpreter_exec): Return struct
> Index: generic/gdbtk-hooks.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
> retrieving revision 1.39
> diff -u -p -r1.39 gdbtk-hooks.c
> --- generic/gdbtk-hooks.c	13 Dec 2004 20:42:20 -0000	1.39
> +++ generic/gdbtk-hooks.c	10 May 2005 20:13:42 -0000
> @@ -105,6 +105,7 @@ static void gdbtk_set_hook (struct cmd_l
>   * See note there for details.
>   */
>  
> +long gdbtk_read (struct ui_file *, char *, long);
>  void gdbtk_fputs (const char *, struct ui_file *);
>  static int gdbtk_load_hash (const char *, unsigned long);
>  
> @@ -220,6 +221,14 @@ gdbtk_two_elem_cmd (cmd_name, argv1)
>  }
>  
>  struct ui_file *
> +gdbtk_fileopenin (void)
> +{
> +  struct ui_file *file = ui_file_new ();
> +  set_ui_file_read (file, gdbtk_read);
> +  return file;
> +}
> +
> +struct ui_file *
>  gdbtk_fileopen (void)
>  {
>    struct ui_file *file = ui_file_new ();
> @@ -227,6 +236,42 @@ gdbtk_fileopen (void)
>    return file;
>  }
>  
> +/* This handles input from the gdb console.
> + */
> +
> +long
> +gdbtk_read (struct ui_file *stream, char *buf, long sizeof_buf)
> +{
> +  int result;
> +  size_t actual_len;
> +
> +  if (stream == gdb_stdtargin)
> +    {
> +      result = Tcl_Eval (gdbtk_interp, "gdbtk_console_read");
> +      if (result != TCL_OK)
> +	{
> +	  report_error ();
> +	  actual_len = 0;
> +	}
> +      else
> +        actual_len = strlen (gdbtk_interp->result);
> +
> +      /* Truncate the string if it is too big for the caller's buffer.  */
> +      if (actual_len >= sizeof_buf)
> +	actual_len = sizeof_buf - 1;
> +      
> +      memcpy (buf, gdbtk_interp->result, actual_len);
> +      buf[actual_len] = '\0';
> +      return actual_len;
> +    }
> +  else
> +    {
> +      errno = EBADF;
> +      return 0;
> +    }
> +}
> +
> +
>  /* This handles all the output from gdb.  All the gdb printf_xxx functions
>   * eventually end up here.  The output is either passed to the result_ptr
>   * where it will go to the result of some gdbtk command, or passed to the
> Index: generic/gdbtk-interp.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-interp.c,v
> retrieving revision 1.6
> diff -u -p -r1.6 gdbtk-interp.c
> --- generic/gdbtk-interp.c	28 Apr 2005 23:45:07 -0000	1.6
> +++ generic/gdbtk-interp.c	10 May 2005 20:13:42 -0000
> @@ -43,6 +43,7 @@ struct gdbtk_interp_data
>    struct ui_file *_stderr;
>    struct ui_file *_stdlog;
>    struct ui_file *_stdtarg;
> +  struct ui_file *_stdtargin;
>  };
>  
>  static struct gdbtk_interp_data *gdbtk_data;
> @@ -83,6 +84,7 @@ gdbtk_interpreter_resume (void *data)
>    gdb_stderr = d->_stderr;
>    gdb_stdlog = d->_stdlog;
>    gdb_stdtarg = d->_stdtarg;
> +  gdb_stdtargin = d->_stdtargin;
>  
>    deprecated_command_loop_hook = gdbtk_command_loop;
>  
> @@ -172,6 +174,7 @@ _initialize_gdbtk_interp (void)
>    gdbtk_data->_stderr = gdbtk_fileopen ();
>    gdbtk_data->_stdlog = gdbtk_fileopen ();
>    gdbtk_data->_stdtarg = gdbtk_fileopen ();
> +  gdbtk_data->_stdtargin = gdbtk_fileopenin ();
>    gdbtk_interp = interp_new ("insight", gdbtk_data, cli_out_new (gdbtk_data->_stdout),
>  			     &procs);
>    interp_add (gdbtk_interp);
> Index: generic/gdbtk.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.h,v
> retrieving revision 1.9
> diff -u -p -r1.9 gdbtk.h
> --- generic/gdbtk.h	25 Jun 2004 19:44:22 -0000	1.9
> +++ generic/gdbtk.h	10 May 2005 20:13:42 -0000
> @@ -159,6 +159,7 @@ extern int gdbtk_two_elem_cmd (char *, c
>  extern int target_is_native (struct target_ops *t);
>  extern void gdbtk_fputs (const char *, struct ui_file *);
>  extern struct ui_file *gdbtk_fileopen (void);
> +extern struct ui_file *gdbtk_fileopenin (void);
>  extern int gdbtk_disable_fputs;
>  
>  #ifdef _WIN32

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: RFC: patch for insight & target stdin
  2005-05-11 14:01 ` Fernando Nasser
@ 2005-05-11 14:10   ` Dave Korn
  2005-05-11 14:21   ` James Lemke
  1 sibling, 0 replies; 15+ messages in thread
From: Dave Korn @ 2005-05-11 14:10 UTC (permalink / raw)
  To: 'Fernando Nasser', 'James Lemke'; +Cc: insight

----Original Message----
>From: Fernando Nasser
>Sent: 11 May 2005 15:00

> Hi Jim,
> 
> The reason I left this out was because it breaks on Windows (Cygwin), at
> least the code I had at the time broke with the Cygwin of that time...
> 
> We need someone to test this on a Windows machine and see what happens.

  I do insight-under-cygwin; I'll have a go with it, although since I'm
going to be away over the weekend, if I don't manage to get round to it in
the next 48 hours it won't be until next week that I can tell you how it
works.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-11 14:01 ` Fernando Nasser
  2005-05-11 14:10   ` Dave Korn
@ 2005-05-11 14:21   ` James Lemke
  1 sibling, 0 replies; 15+ messages in thread
From: James Lemke @ 2005-05-11 14:21 UTC (permalink / raw)
  To: insight

On Wed, 2005-05-11 at 10:00, Fernando Nasser wrote:
> Hi Jim,
> 
> The reason I left this out was because it breaks on Windows (Cygwin), at 
> least the code I had at the time broke with the Cygwin of that time...
> 
> We need someone to test this on a Windows machine and see what happens.
Hi Fernando.
Do you mean Cygwin native?  I did test on Cygwin x xscale-elf.

Jim.

> James Lemke wrote:
> > I had a customer complaint about insight, that target programs could
> > write to stdout but not read from stdin.  On Linux, stdout went to the
> > console window and stdin came from the launch shell.  On Windows stdout
> > went to the console window and stdin just failed with EBADF.
> > 
> > Apparently this was never implemented, so I made an attempt.  Reads from
> > stdin now come from the console window.  This has been tested with
> > x86-linux x xscale-elf and cygwin x xscale-elf.
> > 
> > I don't know gdb / gdbtk implementation well, so I'm open to comments.
> > 
> > Jim.

-- 
James Lemke   jim@wasabisystems.com   Orillia, Ontario
http://www.wasabisystems.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-10 20:46 RFC: patch for insight & target stdin James Lemke
  2005-05-11 14:01 ` Fernando Nasser
@ 2005-05-17 13:23 ` James Lemke
  2005-05-17 15:35   ` Keith Seitz
  2005-05-27  1:56   ` Keith Seitz
  2005-05-24 18:43 ` James Lemke
  2 siblings, 2 replies; 15+ messages in thread
From: James Lemke @ 2005-05-17 13:23 UTC (permalink / raw)
  To: insight

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

On Tue, 2005-05-10 at 16:45, James Lemke wrote:
> I had a customer complaint about insight, that target programs could
> write to stdout but not read from stdin.  On Linux, stdout went to the
> console window and stdin came from the launch shell.  On Windows stdout
> went to the console window and stdin just failed with EBADF.
> 
> Apparently this was never implemented, so I made an attempt.  Reads from
> stdin now come from the console window.  This has been tested with
> x86-linux x xscale-elf and cygwin x xscale-elf.
> 
> I don't know gdb / gdbtk implementation well, so I'm open to comments.

Ping?  Dave / Keith?



-- 
James Lemke   jim@wasabisystems.com   Orillia, Ontario
http://www.wasabisystems.com

[-- Attachment #2: fsf-trunk-gdbtk.patch --]
[-- Type: text/x-patch, Size: 4354 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/ChangeLog,v
retrieving revision 1.362
diff -u -p -r1.362 ChangeLog
--- ChangeLog	28 Apr 2005 23:45:06 -0000	1.362
+++ ChangeLog	10 May 2005 20:13:42 -0000
@@ -1,3 +1,10 @@
+2005-05-10  James Lemke  <jim@wasabisystems.com>
+
+	* generic/gdbtk-hooks.c (gdbtk_fileopenin, gdbtk_read): New functions
+	for target to read stdin from console window.
+	* generic/gdbtk-interp.c (_stdtargin): Added.
+	* generic/gdbtk.h (gdbtk_fileopenin): Add declaration.
+
 2005-04-28  Ben Elliston  <bje@au.ibm.com>
 
 	* generic/gdbtk-interp.c (gdbtk_interpreter_exec): Return struct
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.39
diff -u -p -r1.39 gdbtk-hooks.c
--- generic/gdbtk-hooks.c	13 Dec 2004 20:42:20 -0000	1.39
+++ generic/gdbtk-hooks.c	10 May 2005 20:13:42 -0000
@@ -105,6 +105,7 @@ static void gdbtk_set_hook (struct cmd_l
  * See note there for details.
  */
 
+long gdbtk_read (struct ui_file *, char *, long);
 void gdbtk_fputs (const char *, struct ui_file *);
 static int gdbtk_load_hash (const char *, unsigned long);
 
@@ -220,6 +221,14 @@ gdbtk_two_elem_cmd (cmd_name, argv1)
 }
 
 struct ui_file *
+gdbtk_fileopenin (void)
+{
+  struct ui_file *file = ui_file_new ();
+  set_ui_file_read (file, gdbtk_read);
+  return file;
+}
+
+struct ui_file *
 gdbtk_fileopen (void)
 {
   struct ui_file *file = ui_file_new ();
@@ -227,6 +236,42 @@ gdbtk_fileopen (void)
   return file;
 }
 
+/* This handles input from the gdb console.
+ */
+
+long
+gdbtk_read (struct ui_file *stream, char *buf, long sizeof_buf)
+{
+  int result;
+  size_t actual_len;
+
+  if (stream == gdb_stdtargin)
+    {
+      result = Tcl_Eval (gdbtk_interp, "gdbtk_console_read");
+      if (result != TCL_OK)
+	{
+	  report_error ();
+	  actual_len = 0;
+	}
+      else
+        actual_len = strlen (gdbtk_interp->result);
+
+      /* Truncate the string if it is too big for the caller's buffer.  */
+      if (actual_len >= sizeof_buf)
+	actual_len = sizeof_buf - 1;
+      
+      memcpy (buf, gdbtk_interp->result, actual_len);
+      buf[actual_len] = '\0';
+      return actual_len;
+    }
+  else
+    {
+      errno = EBADF;
+      return 0;
+    }
+}
+
+
 /* This handles all the output from gdb.  All the gdb printf_xxx functions
  * eventually end up here.  The output is either passed to the result_ptr
  * where it will go to the result of some gdbtk command, or passed to the
Index: generic/gdbtk-interp.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-interp.c,v
retrieving revision 1.6
diff -u -p -r1.6 gdbtk-interp.c
--- generic/gdbtk-interp.c	28 Apr 2005 23:45:07 -0000	1.6
+++ generic/gdbtk-interp.c	10 May 2005 20:13:42 -0000
@@ -43,6 +43,7 @@ struct gdbtk_interp_data
   struct ui_file *_stderr;
   struct ui_file *_stdlog;
   struct ui_file *_stdtarg;
+  struct ui_file *_stdtargin;
 };
 
 static struct gdbtk_interp_data *gdbtk_data;
@@ -83,6 +84,7 @@ gdbtk_interpreter_resume (void *data)
   gdb_stderr = d->_stderr;
   gdb_stdlog = d->_stdlog;
   gdb_stdtarg = d->_stdtarg;
+  gdb_stdtargin = d->_stdtargin;
 
   deprecated_command_loop_hook = gdbtk_command_loop;
 
@@ -172,6 +174,7 @@ _initialize_gdbtk_interp (void)
   gdbtk_data->_stderr = gdbtk_fileopen ();
   gdbtk_data->_stdlog = gdbtk_fileopen ();
   gdbtk_data->_stdtarg = gdbtk_fileopen ();
+  gdbtk_data->_stdtargin = gdbtk_fileopenin ();
   gdbtk_interp = interp_new ("insight", gdbtk_data, cli_out_new (gdbtk_data->_stdout),
 			     &procs);
   interp_add (gdbtk_interp);
Index: generic/gdbtk.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.h,v
retrieving revision 1.9
diff -u -p -r1.9 gdbtk.h
--- generic/gdbtk.h	25 Jun 2004 19:44:22 -0000	1.9
+++ generic/gdbtk.h	10 May 2005 20:13:42 -0000
@@ -159,6 +159,7 @@ extern int gdbtk_two_elem_cmd (char *, c
 extern int target_is_native (struct target_ops *t);
 extern void gdbtk_fputs (const char *, struct ui_file *);
 extern struct ui_file *gdbtk_fileopen (void);
+extern struct ui_file *gdbtk_fileopenin (void);
 extern int gdbtk_disable_fputs;
 
 #ifdef _WIN32

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-17 13:23 ` James Lemke
@ 2005-05-17 15:35   ` Keith Seitz
  2005-05-27  1:56   ` Keith Seitz
  1 sibling, 0 replies; 15+ messages in thread
From: Keith Seitz @ 2005-05-17 15:35 UTC (permalink / raw)
  To: James Lemke; +Cc: insight

On Tue, 2005-05-17 at 09:22 -0400, James Lemke wrote:

> Ping?  Dave / Keith?

I'm guessing Dave is very busy. I will see if I can steal some time on
my wife's PC to try it out on cygwin, but it's only a 500MHz machine, so
it will take the better part of my day (Tuesday is a weird day for me --
I usually end up working only a half day).

With any luck, I'll have a response for you tomorrow or later tonight.

Keith

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-10 20:46 RFC: patch for insight & target stdin James Lemke
  2005-05-11 14:01 ` Fernando Nasser
  2005-05-17 13:23 ` James Lemke
@ 2005-05-24 18:43 ` James Lemke
  2005-05-24 18:50   ` Keith Seitz
  2 siblings, 1 reply; 15+ messages in thread
From: James Lemke @ 2005-05-24 18:43 UTC (permalink / raw)
  To: insight

On Tue, 2005-05-10 at 16:45, James Lemke wrote:
> I had a customer complaint about insight, that target programs could
> write to stdout but not read from stdin.  On Linux, stdout went to the
> console window and stdin came from the launch shell.  On Windows stdout
> went to the console window and stdin just failed with EBADF.
> 
> Apparently this was never implemented, so I made an attempt.  Reads from
> stdin now come from the console window.  This has been tested with
> x86-linux x xscale-elf and cygwin x xscale-elf.

Ping?

-- 
James Lemke   jim@wasabisystems.com   Orillia, Ontario
http://www.wasabisystems.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-24 18:43 ` James Lemke
@ 2005-05-24 18:50   ` Keith Seitz
  2005-05-26 16:25     ` Multiple definition of `_solib_address' [was RE: RFC: patch for insight & target stdin] Dave Korn
  0 siblings, 1 reply; 15+ messages in thread
From: Keith Seitz @ 2005-05-24 18:50 UTC (permalink / raw)
  To: James Lemke; +Cc: insight

On Tue, 2005-05-24 at 14:43 -0400, James Lemke wrote:

> Ping?

Grr. My bad. Been a very, very busy week. I promise to have this done
very soon (end of week at the latest).

Really.

Keith

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Multiple definition of `_solib_address' [was RE: RFC: patch for insight & target stdin]
  2005-05-24 18:50   ` Keith Seitz
@ 2005-05-26 16:25     ` Dave Korn
  2005-05-26 16:28       ` Keith Seitz
  0 siblings, 1 reply; 15+ messages in thread
From: Dave Korn @ 2005-05-26 16:25 UTC (permalink / raw)
  To: 'Keith Seitz', 'James Lemke'; +Cc: insight, gdb

----Original Message----
>From: Keith Seitz
>Sent: 24 May 2005 19:50

> On Tue, 2005-05-24 at 14:43 -0400, James Lemke wrote:
> 
>> Ping?
> 
> Grr. My bad. Been a very, very busy week. I promise to have this done
> very soon (end of week at the latest).
> 
> Really.
> 
> Keith

  I said I'd give it some testing too, didn't I?  I was somewhat delayed
last week by getting stranded in Spain on what was meant to only be a long
weekend......

  Anyway, so far I've only got as far as discovering that CVS HEAD of
(insight+dejagnu) won't build at the moment.  Anyone recognize this error?
I'm afraid solibs in general are not my forte......

rm -f gdb.exe
gcc -g -O2      -Wl,--subsystem,console \
        -o gdb.exe gdb.o libgdb.a \
           ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a
..
/libiberty/libiberty.a    ../libgui/src/libgui.a
-L/davek/patch-gnu/testing/gdb/
obj/itcl/itcl -litcl32 -L/davek/patch-gnu/testing/gdb/obj/itcl/itk -litk32
-L/da
vek/patch-gnu/testing/gdb/obj/tk/win -ltk84
-L/davek/patch-gnu/testing/gdb/obj/t
cl/win -ltcl84    -lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -lncurses
-lm
-liconv ../libiberty/libiberty.a -luser32 -limagehlp -lshell32 -lgdi32
-lcomdlg3
2 -ladvapi32
libgdb.a(solib.o)(.text+0xd00): In function `solib_address':
/gnu/testing/gdb/src/gdb/solib.c:771: multiple definition of
`_solib_address'
libgdb.a(win32-nat.o)(.text+0xdf0):/gnu/testing/gdb/src/gdb/win32-nat.c:728:
fir
st defined here


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Multiple definition of `_solib_address' [was RE: RFC: patch for insight & target stdin]
  2005-05-26 16:25     ` Multiple definition of `_solib_address' [was RE: RFC: patch for insight & target stdin] Dave Korn
@ 2005-05-26 16:28       ` Keith Seitz
  2005-05-26 16:32         ` Multiple definition of `_solib_address' [was RE: RFC: patchfor " Dave Korn
  0 siblings, 1 reply; 15+ messages in thread
From: Keith Seitz @ 2005-05-26 16:28 UTC (permalink / raw)
  To: Dave Korn; +Cc: insight, gdb

On Thu, 2005-05-26 at 17:25 +0100, Dave Korn wrote:

>   Anyway, so far I've only got as far as discovering that CVS HEAD of
> (insight+dejagnu) won't build at the moment.  Anyone recognize this error?
> I'm afraid solibs in general are not my forte......
> 
> rm -f gdb.exe
> gcc -g -O2      -Wl,--subsystem,console \
>         -o gdb.exe gdb.o libgdb.a \
>            ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a
> ..
> /libiberty/libiberty.a    ../libgui/src/libgui.a
> -L/davek/patch-gnu/testing/gdb/
> obj/itcl/itcl -litcl32 -L/davek/patch-gnu/testing/gdb/obj/itcl/itk -litk32
> -L/da
> vek/patch-gnu/testing/gdb/obj/tk/win -ltk84
> -L/davek/patch-gnu/testing/gdb/obj/t
> cl/win -ltcl84    -lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -lncurses
> -lm
> -liconv ../libiberty/libiberty.a -luser32 -limagehlp -lshell32 -lgdi32
> -lcomdlg3
> 2 -ladvapi32
> libgdb.a(solib.o)(.text+0xd00): In function `solib_address':
> /gnu/testing/gdb/src/gdb/solib.c:771: multiple definition of
> `_solib_address'
> libgdb.a(win32-nat.o)(.text+0xdf0):/gnu/testing/gdb/src/gdb/win32-nat.c:728:
> first defined here

Yeah, it looks like gdb is undergoing some churn in the shared library
support... I just worked around it by adding #ifndef __CYGWIN__ in
solib.c to wipe the other definition of solib_address. I guess we should
mention this on the gdb list if it hasn't been fixed yet.

Keith

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Multiple definition of `_solib_address' [was RE: RFC: patchfor insight & target stdin]
  2005-05-26 16:28       ` Keith Seitz
@ 2005-05-26 16:32         ` Dave Korn
  2005-05-26 16:34           ` Keith Seitz
  0 siblings, 1 reply; 15+ messages in thread
From: Dave Korn @ 2005-05-26 16:32 UTC (permalink / raw)
  To: 'Keith Seitz'; +Cc: insight, gdb

-----Original Message-----
>From: Keith Seitz [mailto:keiths@redhat] 
>Sent: 26 May 2005 17:28
>To: Dave Korn
>Cc: insight@sourceware; gdb@sourceware
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> solib.c to wipe the other definition of solib_address. I guess we should
> mention this on the gdb list if it hasn't been fixed yet.
 
  :)  We just did!

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Multiple definition of `_solib_address' [was RE: RFC: patchfor insight & target stdin]
  2005-05-26 16:32         ` Multiple definition of `_solib_address' [was RE: RFC: patchfor " Dave Korn
@ 2005-05-26 16:34           ` Keith Seitz
  0 siblings, 0 replies; 15+ messages in thread
From: Keith Seitz @ 2005-05-26 16:34 UTC (permalink / raw)
  To: Dave Korn; +Cc: insight

On Thu, 2005-05-26 at 17:31 +0100, Dave Korn wrote:
> -----Original Message-----
> >From: Keith Seitz [mailto:keiths@redhat] 
> >Sent: 26 May 2005 17:28
> >To: Dave Korn
> >Cc: insight@sourceware; gdb@sourceware
>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> > solib.c to wipe the other definition of solib_address. I guess we should
> > mention this on the gdb list if it hasn't been fixed yet.
>  
>   :)  We just did!

Doh! It's been a long month.

Keith

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-17 13:23 ` James Lemke
  2005-05-17 15:35   ` Keith Seitz
@ 2005-05-27  1:56   ` Keith Seitz
  2005-05-27 12:40     ` James Lemke
  1 sibling, 1 reply; 15+ messages in thread
From: Keith Seitz @ 2005-05-27  1:56 UTC (permalink / raw)
  To: James Lemke; +Cc: insight

On Tue, 2005-05-17 at 09:22 -0400, James Lemke wrote:
> Ping?  Dave / Keith?

Okay, I've tried this on both linux native and cygwin native and there
appears to be no problems.

I have not tried this on a cross toolchain, but you have, and that's
good enough for me.

I presume you have an FSF assignment? [To hell with, umm, you know who.
An FSF assignment is good enough for me.]

Keith

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-27  1:56   ` Keith Seitz
@ 2005-05-27 12:40     ` James Lemke
  2005-05-27 15:57       ` Keith Seitz
  0 siblings, 1 reply; 15+ messages in thread
From: James Lemke @ 2005-05-27 12:40 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

On Thu, 2005-05-26 at 21:56, Keith Seitz wrote:
> On Tue, 2005-05-17 at 09:22 -0400, James Lemke wrote:
> > Ping?  Dave / Keith?
> 
> Okay, I've tried this on both linux native and cygwin native and there
> appears to be no problems.
> 
> I have not tried this on a cross toolchain, but you have, and that's
> good enough for me.
> 
> I presume you have an FSF assignment? [To hell with, umm, you know who.
> An FSF assignment is good enough for me.]

Thanks Keith.
Yes, I have a personal assignment for gcc/gdb/binutils and one through
my employer.

Should I commit, or you?
Jim.

-- 
James Lemke   jim@wasabisystems.com   Orillia, Ontario
http://www.wasabisystems.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: RFC: patch for insight & target stdin
  2005-05-27 12:40     ` James Lemke
@ 2005-05-27 15:57       ` Keith Seitz
  0 siblings, 0 replies; 15+ messages in thread
From: Keith Seitz @ 2005-05-27 15:57 UTC (permalink / raw)
  To: James Lemke; +Cc: insight

On Fri, 2005-05-27 at 08:40 -0400, James Lemke wrote:
> Yes, I have a personal assignment for gcc/gdb/binutils and one through
> my employer.
> 
> Should I commit, or you?

If you have write access, by all means, please commit your patches.

Keith

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-05-27 15:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-10 20:46 RFC: patch for insight & target stdin James Lemke
2005-05-11 14:01 ` Fernando Nasser
2005-05-11 14:10   ` Dave Korn
2005-05-11 14:21   ` James Lemke
2005-05-17 13:23 ` James Lemke
2005-05-17 15:35   ` Keith Seitz
2005-05-27  1:56   ` Keith Seitz
2005-05-27 12:40     ` James Lemke
2005-05-27 15:57       ` Keith Seitz
2005-05-24 18:43 ` James Lemke
2005-05-24 18:50   ` Keith Seitz
2005-05-26 16:25     ` Multiple definition of `_solib_address' [was RE: RFC: patch for insight & target stdin] Dave Korn
2005-05-26 16:28       ` Keith Seitz
2005-05-26 16:32         ` Multiple definition of `_solib_address' [was RE: RFC: patchfor " Dave Korn
2005-05-26 16:34           ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).