From: asmwarrior <asmwarrior@gmail.com>
To: Ralf Corsepius <ralf.corsepius@rtems.org>
Cc: gdb@sourceware.org, Yao Qi <qiyaoltc@gmail.com>
Subject: Re: [windows] build error on gdbserver
Date: Thu, 24 Nov 2011 14:47:00 -0000 [thread overview]
Message-ID: <4ECE59C7.2010206@gmail.com> (raw)
In-Reply-To: <4ECE507F.8020501@rtems.org>
On 2011-11-24 22:11, Ralf Corsepius wrote:
> Use "configure --disable-werror ..."
For me, I think this is only a work around, the code snippet looks like below:
static void
cmd_qtstatus (char *packet)
{
char *stop_reason_rsp = NULL;
char *buf1, *buf2, *buf3, *str;
int slen;
/* Translate the plain text of the notes back into hex for
transmission. */
str = (tracing_user_name ? tracing_user_name : "");
slen = strlen (str);
buf1 = (char *) alloca (slen * 2 + 1);
hexify (buf1, str, slen);
str = (tracing_notes ? tracing_notes : "");
slen = strlen (str);
buf2 = (char *) alloca (slen * 2 + 1);
hexify (buf2, str, slen);
str = (tracing_stop_note ? tracing_stop_note : "");
slen = strlen (str);
buf3 = (char *) alloca (slen * 2 + 1);
hexify (buf3, str, slen);
trace_debug ("Returning trace status as %d, stop reason %s",
tracing, tracing_stop_reason);
if (in_process_agent_loaded ())
{
pause_all (1);
upload_fast_traceframes ();
unpause_all (1);
}
stop_reason_rsp = (char *) tracing_stop_reason;
/* The user visible error string in terror needs to be hex encoded.
We leave it as plain string in `tracing_stop_reason' to ease
debugging. */
if (strncmp (stop_reason_rsp, "terror:", strlen ("terror:")) == 0)
{
const char *result_name;
int hexstr_len;
char *p;
result_name = stop_reason_rsp + strlen ("terror:");
hexstr_len = strlen (result_name) * 2;
p = stop_reason_rsp = alloca (strlen ("terror:") + hexstr_len + 1);
strcpy (p, "terror:");
p += strlen (p);
convert_int_to_ascii ((gdb_byte *) result_name, p, strlen (result_name));
}
/* If this was a forced stop, include any stop note that was supplied. */
if (strcmp (stop_reason_rsp, "tstop") == 0)
{
stop_reason_rsp = alloca (strlen ("tstop:") + strlen (buf3) + 1);
strcpy (stop_reason_rsp, "tstop:");
strcat (stop_reason_rsp, buf3);
}
sprintf (packet,
"T%d;"
"%s:%x;"
"tframes:%x;tcreated:%x;"
"tfree:%x;tsize:%s;"
"circular:%d;"
"disconn:%d;"
"starttime:%llx;stoptime:%llx;"
"username:%s:;notes:%s:",
tracing ? 1 : 0,
stop_reason_rsp, tracing_stop_tpnum,
traceframe_count, traceframes_created,
free_space (), phex_nz (trace_buffer_hi - trace_buffer_lo, 0),
circular_trace_buffer,
disconnected_tracing,
tracing_start_time, tracing_stop_time,
buf1, buf2);
}
There is a sprintf call with many parameters. I have no idea about %llx ????
next prev parent reply other threads:[~2011-11-24 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 13:07 asmwarrior
2011-11-24 14:15 ` Ralf Corsepius
2011-11-24 14:32 ` Eli Zaretskii
2011-11-24 14:51 ` Ralf Corsepius
2011-11-24 14:47 ` asmwarrior [this message]
2011-11-24 15:05 ` Pedro Alves
2011-11-24 17:38 ` Stan Shebs
2011-11-25 12:02 ` asmwarrior
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=4ECE59C7.2010206@gmail.com \
--to=asmwarrior@gmail.com \
--cc=gdb@sourceware.org \
--cc=qiyaoltc@gmail.com \
--cc=ralf.corsepius@rtems.org \
/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