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]

[PATCH] tfind fixes


Another couple of old inhouse fixes to tfind; with these the gdb.trace part of the testsuite runs cleanly with gdbserver, where it didn't after my last tfind checkin, ahem. Committed to trunk.

Stan

2010-04-19  Stan Shebs  <stan@codesourcery.com>
       Vladimir Prus  <vladimir@codesourcery.com>

   * tracepoint.c (tfind_1): Add missing newline, report exit from
   tfind mode as such.
   * target.c (update_current_target): Make default
   to_trace_find return -1.

Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.246
diff -p -r1.246 target.c
*** target.c	16 Apr 2010 07:49:35 -0000	1.246
--- target.c	19 Apr 2010 22:05:20 -0000
*************** update_current_target (void)
*** 832,838 ****
  	    tcomplain);
    de_fault (to_trace_find,
  	    (int (*) (enum trace_find_type, int, ULONGEST, ULONGEST, int *))
! 	    return_zero);
    de_fault (to_get_trace_state_variable_value,
  	    (int (*) (int, LONGEST *))
  	    return_zero);
--- 832,838 ----
  	    tcomplain);
    de_fault (to_trace_find,
  	    (int (*) (enum trace_find_type, int, ULONGEST, ULONGEST, int *))
! 	    return_minus_one);
    de_fault (to_get_trace_state_variable_value,
  	    (int (*) (int, LONGEST *))
  	    return_zero);
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.180
diff -p -r1.180 tracepoint.c
*** tracepoint.c	16 Apr 2010 18:22:01 -0000	1.180
--- tracepoint.c	19 Apr 2010 22:05:20 -0000
*************** tfind_1 (enum trace_find_type type, int 
*** 1949,1956 ****
      {
        if (ui_out_is_mi_like_p (uiout))
  	ui_out_field_string (uiout, "found", "0");
!       else
! 	printf_unfiltered (_("No trace frame found"));
      }
  
    /* If we're in nonstop mode and getting out of looking at trace
--- 1949,1958 ----
      {
        if (ui_out_is_mi_like_p (uiout))
  	ui_out_field_string (uiout, "found", "0");
!       else if (type == tfind_number && num == -1)
! 	printf_unfiltered (_("No longer looking at any trace frame\n"));
!       else /* this case may never occur, check */
! 	printf_unfiltered (_("No trace frame found\n"));
      }
  
    /* If we're in nonstop mode and getting out of looking at trace

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