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] |
struct breakpoint *
create_tracepoint_from_upload (struct uploaded_tp *utp)
{
! char *addr_str, small_buf[100];
[...]
! sprintf (small_buf, "*%s", hex_string (utp->addr));
Tz-tz-tz... Using a constant-size buffer in sprintf without any check
for overflow? Are you sure that calling the buffer ``small'' will
magically keep you from trouble? ;-)
! if (utp->cond && !utp->cond_string)
! warning ("Uploaded tracepoint %d condition has no source form, ignoring it",
What about _() ?
+ void
+ encode_source_string (int tpnum, ULONGEST addr,
+ char *srctype, char *src, char *buf)
+ {
+ sprintf (buf, "%x:%s:%s:%x:%x:",
+ tpnum, phex_nz (addr, sizeof (addr)), srctype, 0, (int) strlen (src));
Again, sprintf on a buffer whose size is not even known.
written = fwrite ("\x7fTRACE0\n", 8, 1, fp);
! if (written < 8)
perror_with_name (pathname);
/* Write descriptive info. */
--- 2468,2474 ----
binary file, plus a hint as what this file is, and a version
number in case of future needs. */
written = fwrite ("\x7fTRACE0\n", 8, 1, fp);
! if (written < 1)
perror_with_name (pathname);
Why did you change this to accept partial writes?
+ Specify a source string of tracepoint @var{n} at address @var{var}.
^^^^^^^^^ You meant @var{addr}, I presume.
Anyway, can we have several tracepoints with the same number? If not,
why do we need to give the address as well?
such as @samp{cond} for the
+ conditional expression
Conditional expression for what or from where? I'm guessing this is
somehow related to the original definition of the tracepoint, but
please connect the dots more explicitly.
+ @value{GDBN} issues a separate packet, in order, for each command in a
+ list.
What list?
The target does not need to do anything with source strings
+ except report them back as part of the @samp{qTfP}/@samp{qTsP}
+ queries.
"As part of queries" or as part or _responses_?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |