projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix "'operator new' should not return NULL" errors in testsuite
[deliverable/binutils-gdb.git]
/
gdb
/
btrace.c
diff --git
a/gdb/btrace.c
b/gdb/btrace.c
index 9f90d59e2b587b214fe3704eb12cdb721d55a9f9..d41e3c4f8f91ac102a76207437a80b1545590f1b 100644
(file)
--- a/
gdb/btrace.c
+++ b/
gdb/btrace.c
@@
-1592,7
+1592,8
@@
void
btrace_enable (struct thread_info *tp, const struct btrace_config *conf)
{
if (tp->btrace.target != NULL)
btrace_enable (struct thread_info *tp, const struct btrace_config *conf)
{
if (tp->btrace.target != NULL)
- return;
+ error (_("Recording already enabled on thread %s (%s)."),
+ print_thread_id (tp), target_pid_to_str (tp->ptid).c_str ());
#if !defined (HAVE_LIBIPT)
if (conf->format == BTRACE_FORMAT_PT)
#if !defined (HAVE_LIBIPT)
if (conf->format == BTRACE_FORMAT_PT)
@@
-1604,9
+1605,9
@@
btrace_enable (struct thread_info *tp, const struct btrace_config *conf)
tp->btrace.target = target_enable_btrace (tp->ptid, conf);
tp->btrace.target = target_enable_btrace (tp->ptid, conf);
- /* We're done if we failed to enable tracing. */
if (tp->btrace.target == NULL)
if (tp->btrace.target == NULL)
- return;
+ error (_("Failed to enable recording on thread %s (%s)."),
+ print_thread_id (tp), target_pid_to_str (tp->ptid).c_str ());
/* We need to undo the enable in case of errors. */
try
/* We need to undo the enable in case of errors. */
try
@@
-1651,7
+1652,8
@@
btrace_disable (struct thread_info *tp)
struct btrace_thread_info *btp = &tp->btrace;
if (btp->target == NULL)
struct btrace_thread_info *btp = &tp->btrace;
if (btp->target == NULL)
- return;
+ error (_("Recording not enabled on thread %s (%s)."),
+ print_thread_id (tp), target_pid_to_str (tp->ptid).c_str ());
DEBUG ("disable thread %s (%s)", print_thread_id (tp),
target_pid_to_str (tp->ptid).c_str ());
DEBUG ("disable thread %s (%s)", print_thread_id (tp),
target_pid_to_str (tp->ptid).c_str ());
This page took
0.025941 seconds
and
4
git commands to generate.