diff options
author | Marcin Kościelnicki <koriakin@0x04.net> | 2016-03-02 17:18:29 +0100 |
---|---|---|
committer | Marcin Kościelnicki <koriakin@0x04.net> | 2016-03-02 17:18:29 +0100 |
commit | 6896a8fa1e1d24a8fcc9b30efc0b195246b46029 (patch) | |
tree | 993a1d5a43aaaa46f1e8d9294d70421f0f9d1597 /gdb/gdbserver | |
parent | 065ab6dc804575bce7df58477b2cfcb2b2a6eafb (diff) | |
download | gdb-6896a8fa1e1d24a8fcc9b30efc0b195246b46029.zip gdb-6896a8fa1e1d24a8fcc9b30efc0b195246b46029.tar.gz gdb-6896a8fa1e1d24a8fcc9b30efc0b195246b46029.tar.bz2 |
[OBV] gdbserver: Only write ipa_tdesc_idx if agent is actually loaded.
Fixes rather embarassing gdb.trace regressions.
gdb/gdbserver/ChangeLog:
* tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
is actually loaded.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | 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 ()) |