From: "Marcin Kościelnicki" <koriakin@0x04.net>
To: qiyaoltc@gmail.com
Cc: palves@redhat.com, gdb-patches@sourceware.org,
antoine.tremblay@ericsson.com,
"Marcin Kościelnicki" <koriakin@0x04.net>
Subject: [PATCH] [OBV] gdbserver: Only write ipa_tdesc_idx if agent is actually loaded.
Date: Wed, 02 Mar 2016 16:21:00 -0000 [thread overview]
Message-ID: <1456935665-14939-1-git-send-email-koriakin@0x04.net> (raw)
In-Reply-To: <86egbsanh6.fsf@gmail.com>
Fixes rather embarassing gdb.trace regressions.
gdb/gdbserver/ChangeLog:
* tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
is actually loaded.
---
Whoops, now that's a brown paper bag bug. Pushed as obvious.
gdb/gdbserver/ChangeLog | 5 +++++
gdb/gdbserver/tracepoint.c | 11 +++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 4c8df3f..40150d7 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-02 Marcin KoÅcielnicki <koriakin@0x04.net>
+
+ * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
+ is actually loaded.
+
2016-02-25 Marcin KoÅcielnicki <koriakin@0x04.net>
* linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index dbd0b46..383fb71 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -3214,10 +3214,13 @@ cmd_qtstart (char *packet)
*packet = '\0';
- /* Tell IPA about the correct tdesc. */
- if (write_inferior_integer (ipa_sym_addrs.addr_ipa_tdesc_idx,
- target_get_ipa_tdesc_idx ()))
- error ("Error setting ipa_tdesc_idx variable in lib");
+ if (agent_loaded_p ())
+ {
+ /* Tell IPA about the correct tdesc. */
+ if (write_inferior_integer (ipa_sym_addrs.addr_ipa_tdesc_idx,
+ target_get_ipa_tdesc_idx ()))
+ error ("Error setting ipa_tdesc_idx variable in lib");
+ }
/* Start out empty. */
if (agent_loaded_p ())
--
2.7.1
prev parent reply other threads:[~2016-03-02 16:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-21 21:17 [PATCH] [PR gdb/13808] gdb.trace: Pass tdesc selected in gdbserver to IPA Marcin Kościelnicki
2016-02-23 15:19 ` Antoine Tremblay
2016-02-25 13:08 ` Pedro Alves
2016-02-25 13:39 ` Marcin Kościelnicki
2016-02-25 14:46 ` Pedro Alves
2016-02-25 15:39 ` Marcin Kościelnicki
[not found] ` <56CF2FEF.3090407@redhat.com>
2016-02-25 16:59 ` Marcin Kościelnicki
2016-03-02 15:50 ` Yao Qi
2016-03-02 16:21 ` Marcin Kościelnicki [this message]
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=1456935665-14939-1-git-send-email-koriakin@0x04.net \
--to=koriakin@0x04.net \
--cc=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=qiyaoltc@gmail.com \
/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