This is the mail archive of the gdb-patches@sourceware.org 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]

[MI tracepoints 3/9] -break-insert and tracepoint


This patch makes -break-insert capable of creating tracepoints. This
is pure MI change, but anybody has comments? (Documentation will
be in a separate patch).

Thanks,

-- 
Vladimir Prus
CodeSourcery
vladimir@codesourcery.com
(650) 331-3385 x722
commit 47b85b991829ef0e96f377c5118a2b369ddf8c56
Author: vladimir <vladimir@e7755896-6108-0410-9592-8049d3e74e28>
Date:   Thu Aug 6 07:51:35 2009 +0000

    Implement creating tracepoints with -break-insert.
    
    	Bacause we have run out of good letters to use as options
    	for -mi-break, this patch uses -a to indicate 'tracepoint'.
    	'-h' is used to futher indicate fast tracepoint.
    
    	* mi/mi-cmd-break.c (mi_cmd_break_insert): Handle -a
    	to mean that tracepoint should be created.
    
    git-svn-id: svn+ssh://cugel//net/svn-internal/subversion/Repository/csl/gdb/branches/ericsson-tracing@257805 e7755896-6108-0410-9592-8049d3e74e28

diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 75dfd02..3e82b8f 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -74,6 +74,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
   char *condition = NULL;
   int pending = 0;
   int enabled = 1;
+  int tracepoint = 0;
   struct cleanup *back_to;
 
   struct gdb_exception e;
@@ -81,7 +82,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
   enum opt
     {
       HARDWARE_OPT, TEMP_OPT, CONDITION_OPT,
-      IGNORE_COUNT_OPT, THREAD_OPT, PENDING_OPT, DISABLE_OPT
+      IGNORE_COUNT_OPT, THREAD_OPT, PENDING_OPT, DISABLE_OPT,
+      TRACEPOINT_OPT,
     };
   static struct mi_opt opts[] =
   {
@@ -92,6 +94,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
     {"p", THREAD_OPT, 1},
     {"f", PENDING_OPT, 0},
     {"d", DISABLE_OPT, 0},
+    {"a", TRACEPOINT_OPT, 0},
     { 0, 0, 0 }
   };
 
@@ -126,6 +129,10 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
 	  break;
 	case DISABLE_OPT:
 	  enabled = 0;
+	  break;
+	case TRACEPOINT_OPT:
+	  tracepoint = 1;
+	  break;
 	}
     }
 
@@ -148,7 +155,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
   mi_can_breakpoint_notify = 1;
   create_breakpoint (get_current_arch (), address, condition, thread,
 		     0 /* condition and thread are valid.  */,
-		     temp_p, hardware, 0 /* traceflag */,
+		     temp_p, hardware, tracepoint,
 		     ignore_count,
 		     pending ? AUTO_BOOLEAN_TRUE : AUTO_BOOLEAN_FALSE,
 		     NULL, 0, enabled);

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