gdb/gdbserver/
[deliverable/binutils-gdb.git] / gdb / gdbserver / tracepoint.c
index 0ffedaa134424ba15538640b6f663a82f615b590..0f83ae6d09237bbb2d3d00d29150a5f3a66078d0 100644 (file)
@@ -3969,7 +3969,7 @@ cmd_qtbuffer (char *own_buf)
   unpack_varlen_hex (packet, &num);
 
   trace_debug ("Want to get trace buffer, %d bytes at offset 0x%s",
-              (int) num, pulongest (offset));
+              (int) num, phex_nz (offset, 0));
 
   tot = (trace_buffer_hi - trace_buffer_lo) - free_space ();
 
@@ -4002,7 +4002,6 @@ cmd_qtbuffer (char *own_buf)
     num = (PBUFSIZ - 16) / 2;
 
   convert_int_to_ascii (tbp, own_buf, num);
-  own_buf[num] = '\0';
 }
 
 static void
@@ -4042,6 +4041,7 @@ cmd_qtnotes (char *own_buf)
          user[nbytes] = '\0';
          ++packet; /* skip the semicolon */
          trace_debug ("User is '%s'", user);
+         xfree (tracing_user_name);
          tracing_user_name = user;
        }
       else if (strncmp ("notes:", packet, strlen ("notes:")) == 0)
@@ -4055,6 +4055,7 @@ cmd_qtnotes (char *own_buf)
          notes[nbytes] = '\0';
          ++packet; /* skip the semicolon */
          trace_debug ("Notes is '%s'", notes);
+         xfree (tracing_notes);
          tracing_notes = notes;
        }
       else if (strncmp ("tstop:", packet, strlen ("tstop:")) == 0)
@@ -4068,6 +4069,7 @@ cmd_qtnotes (char *own_buf)
          stopnote[nbytes] = '\0';
          ++packet; /* skip the semicolon */
          trace_debug ("tstop note is '%s'", stopnote);
+         xfree (tracing_stop_note);
          tracing_stop_note = stopnote;
        }
       else
This page took 0.024969 seconds and 4 git commands to generate.