Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@delorie.com>
To: ezannoni@cygnus.com
Cc: gdb-patches@sourceware.cygnus.com, gdb@sourceware.cygnus.com
Subject: Re: Buffering problems with "gdb < foo"
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <200003080947.EAA16453@indy.delorie.com> (raw)
In-Reply-To: <14531.61750.823726.628635@kwikemart.cygnus.com>

>  > If this is not DJGPP-specific, then I think _initialize_event_loop
>  > should turn editing off if input_fd is not a tty.
> 
> I think so, can you submit a patch to do this? 

Attached.  Even though the particular problem that triggered this was
elsewhere (see my other message in this thread), I still think that
when stdin comes from a file, editing should be disabled by default.

2000-03-08  Eli Zaretskii  <eliz@is.elta.co.il>

	* event-top.c (_initialize_event_loop): If instream is not
	connecetd to a terminal device, turn editing off.

--- gdb/event-top.c~0	Sat Mar  4 18:28:20 2000
+++ gdb/event-top.c	Wed Mar  8 00:56:42 2000
@@ -1133,9 +1133,25 @@ _initialize_event_loop (void)
 {
   if (event_loop_p)
     {
-      /* When a character is detected on instream by select or poll,
-         readline will be invoked via this callback function. */
-      call_readline = rl_callback_read_char_wrapper;
+      /* If the input stream is connected to a terminal, turn on
+         editing.  */
+      if (ISATTY (instream))
+	{
+	  /* Tell gdb that we will be using the readline library. This
+	     could be overwritten by a command in .gdbinit like 'set
+	     editing on' or 'off'. */
+	  async_command_editing_p = 1;
+	  
+	  /* When a character is detected on instream by select or
+	     poll, readline will be invoked via this callback
+	     function. */
+	  call_readline = rl_callback_read_char_wrapper;
+	}
+      else
+	{
+	  async_command_editing_p = 0;
+	  call_readline = gdb_readline2;
+	}
 
       /* When readline has read an end-of-line character, it passes
          the complete line to gdb for processing. command_line_handler
@@ -1160,10 +1176,5 @@ _initialize_event_loop (void)
          only when it actually exists (I.e. after we say 'run' or
          after we connect to a remote target. */
       add_file_handler (input_fd, stdin_event_handler, 0);
-
-      /* Tell gdb that we will be using the readline library. This
-         could be overwritten by a command in .gdbinit like 'set
-         editing on' or 'off'. */
-      async_command_editing_p = 1;
     }
 }
From kevinb@cygnus.com Sat Apr 01 00:00:00 2000
From: Kevin Buettner <kevinb@cygnus.com>
To: Alexis Denis <adenis@EE.UManitoba.CA>, gdb@sourceware.cygnus.com
Subject: Re: gdb for java debugging on linuxppc
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <1000221224836.ZM8885@ocotillo.lan>
References: <38B1AC30.D93D824E@ee.umanitoba.ca> <adenis@EE.UManitoba.CA>
X-SW-Source: 2000-q1/msg00364.html
Content-length: 665

On Feb 21,  4:20pm, Alexis Denis wrote:

> I'm running
>     - linuxppc Q3 with 2.2.14pre9 kernel
>     - gcc snapshot 20000214
>     - libgcj snapshot 20000218
>     - gdb snapshot 000220
> 
> I compiled a simple HelloWorld program in java and it runs fine but when
> I try to run it in the debugger I get:
> Starting program: /home/adenis/java/HelloWorld
> Don't know how to run.  Try "help target".
> 
> Any idea why? Thanks,

The gdb snapshots don't have support for linux/ppc yet.

I'm working on it and should have most of the changes into the sourceware
CVS repository either today or tomorrow.

Kevin

-- 
Kevin Buettner
kev@primenet.com, kevinb@redhat.com
From cshihpin@dso.org.sg Sat Apr 01 00:00:00 2000
From: Chan Shih-Ping Richard <cshihpin@dso.org.sg>
To: gdb@sourceware.cygnus.com
Subject: CVS: Cannot overload resolve std::string.size() in valops.c (fwd)
Date: Sat, 01 Apr 2000 00:00:00 -0000
Message-id: <Pine.LNX.4.10.10003011407170.11100-100000@vermeer.dso.org.sg>
X-SW-Source: 2000-q1/msg00460.html
Content-length: 520

Hi all,

There seems to be an off-by-one error in valops.c that prevents
overload resolution of 
	string s.size();
	string s.length();

Didn't Dan Berlin point this out sometime ago (?)- wonder have
I missed a fix in the CVS. When comparing "goodness-of-fit"
nparms = 0 and nargs = 1. In function find_overload_match 
either
	nargs should be 0
or 
	rank_function should use nargs-1.

Comments?







-- 

Chan Shih-Ping (Richard) <cshihpin@dso.org.sg>
DSO National Laboratories
20 Science Park Drive
Singapore 118230



      reply	other threads:[~2000-04-01  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200003050850.DAA10185@indy.delorie.com>
2000-04-01  0:00 ` Elena Zannoni
2000-04-01  0:00   ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003080947.EAA16453@indy.delorie.com \
    --to=eliz@delorie.com \
    --cc=ezannoni@cygnus.com \
    --cc=gdb-patches@sourceware.cygnus.com \
    --cc=gdb@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox