Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Newman <markn_46@yahoo.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com, "Newman,
	Mark \(N-Superior Technical Resource Inc\)"
	<mark.newman@lmco.com>, ankit thukral <ankit_plug@yahoo.com>,
	Jim Blandy <jimb@redhat.com>,
	gdb@sources.redhat.com
Subject: Re: regarding transparent data ranges (in tracepoint support)
Date: Sat, 29 Nov 2003 02:08:00 -0000	[thread overview]
Message-ID: <20031129020725.27486.qmail@web13804.mail.yahoo.com> (raw)
In-Reply-To: <20031129013434.GA13711@nevyn.them.org>

I looked at gdb/CONTRIBUTE.  I hope that this meets
the requirements:

Change Log:

2003-11-28 Mark Newman <markn_46@yahoo.com>

   * provide a better method for filtering of asyn
commands




===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.122
diff -c -p -r1.122 infrun.c
*** gdb/infrun.c	25 Nov 2003 16:01:36 -0000	1.122
--- gdb/infrun.c	29 Nov 2003 02:00:15 -0000
***************
*** 44,49 ****
--- 44,51 ----
  #include "value.h"
  #include "observer.h"
  #include "language.h"
+ #include "cli/cli-decode.h"
+ 
  
  /* Prototypes for local functions */
  
*************** Pass and Stop may be combined.",
NULL));
*** 4005,4010 ****
--- 4007,4014 ----
        add_cmd ("stop", class_obscure,
not_just_help_class_command, "There is no `stop'
command, but you can set a hook on `stop'.\n\
  This allows you to set a list of commands to be run
each time execution\n\
  of the program stops.", &cmdlist);
+     async_cmd(stop_command , ASYNC_OK);
+ 
  
    numsigs = (int) TARGET_SIGNAL_LAST;
    signal_stop = (unsigned char *) xmalloc (sizeof
(signal_stop[0]) * numsigs);
Index: gdb/maint.c
===================================================================
RCS file: /cvs/src/src/gdb/maint.c,v
retrieving revision 1.40
diff -c -p -r1.40 maint.c
*** gdb/maint.c	21 Sep 2003 01:26:45 -0000	1.40
--- gdb/maint.c	29 Nov 2003 02:00:15 -0000
*************** Configure variables internal to GDB
that
*** 734,745 ****
  		  0/*allow-unknown*/,
  		  &maintenancelist);
  
!   add_prefix_cmd ("show", class_maintenance,
maintenance_show_cmd, "\
  Show GDB internal variables used by the GDB
maintainer.\n\
  Configure variables internal to GDB that aid in
GDB's maintenance",
  		  &maintenance_show_cmdlist, "maintenance show ",
  		  0/*allow-unknown*/,
! 		  &maintenancelist);
  
  #ifndef _WIN32
    add_cmd ("dump-me", class_maintenance,
maintenance_dump_me,
--- 734,746 ----
  		  0/*allow-unknown*/,
  		  &maintenancelist);
  
! async_cmd (  add_prefix_cmd ("show",
class_maintenance, maintenance_show_cmd, "\
  Show GDB internal variables used by the GDB
maintainer.\n\
  Configure variables internal to GDB that aid in
GDB's maintenance",
  		  &maintenance_show_cmdlist, "maintenance show ",
  		  0/*allow-unknown*/,
! 		  &maintenancelist)
! , ASYNC_OK);
  
  #ifndef _WIN32
    add_cmd ("dump-me", class_maintenance,
maintenance_dump_me,
Index: gdb/top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.85
diff -c -p -r1.85 top.c
*** gdb/top.c	8 Nov 2003 00:13:03 -0000	1.85
--- gdb/top.c	29 Nov 2003 02:00:19 -0000
*************** execute_command (char *p, int
from_tty)
*** 668,679 ****
  
        /* If the target is running, we allow only a
limited set of
           commands. */
!       if (event_loop_p && target_can_async_p () &&
target_executing)
! 	if (strcmp (c->name, "help") != 0
! 	    && strcmp (c->name, "pwd") != 0
! 	    && strcmp (c->name, "show") != 0
! 	    && strcmp (c->name, "stop") != 0)
! 	  error ("Cannot execute this command while the
target is running.");
  
        /* Pass null arg rather than an empty one.  */
        arg = *p ? p : 0;
--- 668,676 ----
  
        /* If the target is running, we allow only a
limited set of
           commands. */
!       if (event_loop_p && target_can_async_p () &&
target_executing) 
! 	     if ((c->flags & ASYNC_OK) != 0)
! 	        error ("Cannot execute this command while
the target is running.");
  
        /* Pass null arg rather than an empty one.  */
        arg = *p ? p : 0;
*************** execute_command (char *p, int
from_tty)
*** 747,752 ****
--- 744,757 ----
  	  warned = 1;
  	}
      }
+     
+     if (event_loop_p && target_can_async_p () &&
target_executing) {
+ 	if ((c->flags & ASYNC_WAIT) != 0) {
+ 	   wait_for_inferior();
+ 	  }
+       }
+ 
+ 
  }
  
  /* Read commands from `instream' and execute them
Index: gdb/cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.36
diff -c -p -r1.36 cli-cmds.c
*** gdb/cli/cli-cmds.c	8 Nov 2003 00:13:03 -0000	1.36
--- gdb/cli/cli-cmds.c	29 Nov 2003 02:00:20 -0000
*************** The commands below can be used to
select
*** 1056,1063 ****
  
    /* Define general commands. */
  
!   add_com ("pwd", class_files, pwd_command,
! 	"Print working directory.  This is used for your
program as well.");
    c = add_cmd ("cd", class_files, cd_command,
  	       "Set working directory to DIR for debugger
and program being debugged.\n\
  The change does not take effect for the program
being debugged\n\
--- 1056,1064 ----
  
    /* Define general commands. */
  
!   async_cmd(add_com ("pwd", class_files,
pwd_command,
! 	"Print working directory.  This is used for your
program as well.")
! , ASYNC_OK);
    c = add_cmd ("cd", class_files, cd_command,
  	       "Set working directory to DIR for debugger
and program being debugged.\n\
  The change does not take effect for the program
being debugged\n\
*************** when gdb is started.", &cmdlist);
*** 1091,1096 ****
--- 1092,1099 ----
  
    add_com ("quit", class_support, quit_command,
"Exit gdb.");
    c = add_com ("help", class_support, help_command,
"Print list of commands.");
+   async_cmd(c, ASYNC_OK);
+ 
    set_cmd_completer (c, command_completer);
    add_com_alias ("q", "quit", class_support, 1);
    add_com_alias ("h", "help", class_support, 1);
Index: gdb/cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.34
diff -c -p -r1.34 cli-decode.c
*** gdb/cli/cli-decode.c	8 Nov 2003 00:13:03 -0000
1.34
--- gdb/cli/cli-decode.c	29 Nov 2003 02:00:21 -0000
*************** cmd_func (struct cmd_list_element
*cmd, 
*** 1539,1542 ****
--- 1539,1551 ----
      error ("Invalid command");
  }
  
+ struct cmd_list_element *
+ async_cmd (struct cmd_list_element *cmd, int f)
+ {
+ 
+     cmd->flags |= f;
+ 
+   return cmd;
+ }
+ 
  
Index: gdb/cli/cli-decode.h
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.h,v
retrieving revision 1.17
diff -c -p -r1.17 cli-decode.h
*** gdb/cli/cli-decode.h	14 Jan 2003 00:49:05 -0000
1.17
--- gdb/cli/cli-decode.h	29 Nov 2003 02:00:22 -0000
*************** cmd_types;
*** 49,54 ****
--- 49,57 ----
  #define CMD_DEPRECATED            0x1
  #define DEPRECATED_WARN_USER      0x2
  #define MALLOCED_REPLACEMENT      0x4
+ #define ASYNC_OK                  0x08
+ #define ASYNC_WAIT                0x10
+ 
  
  struct cmd_list_element
    {

--- Daniel Jacobowitz <drow@mvista.com> wrote:
> On Fri, Nov 28, 2003 at 05:29:52PM -0800, Mark
> Newman wrote:
> > Here ya go - but I'll be darned if this is
> clearer.
> 
> You might want to read the original message to see
> what I meant :)
> Or try gdb/CONTRIBUTE for directions.
> 
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian
> GNU/Linux Developer


  reply	other threads:[~2003-11-29  2:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20031128192301.GA9654@nevyn.them.org>
2003-11-29  1:29 ` Mark Newman
2003-11-29  1:34   ` Daniel Jacobowitz
2003-11-29  2:08     ` Mark Newman [this message]
2003-11-29  5:41       ` Daniel Jacobowitz
2003-12-04 18:59       ` [RFA] async changes; Was: " Elena Zannoni
2003-12-04 22:16         ` Mark Newman
2003-12-05  2:22         ` Mark Newman

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=20031129020725.27486.qmail@web13804.mail.yahoo.com \
    --to=markn_46@yahoo.com \
    --cc=ankit_plug@yahoo.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@redhat.com \
    --cc=mark.newman@lmco.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