gdb.trace: Fix string collection for 64-bit platforms.
authorMarcin Kościelnicki <koriakin@0x04.net>
Thu, 21 Jan 2016 15:58:12 +0000 (16:58 +0100)
committerMarcin Kościelnicki <koriakin@0x04.net>
Thu, 21 Jan 2016 16:36:27 +0000 (17:36 +0100)
commitf906b857015513af81f94db8e11b1e334c767def
treea59e9e758b39cb054033f27bce2dfcf924b0db00
parentdfc43940242f10b54eb5afd2125d91f849df0b2e
gdb.trace: Fix string collection for 64-bit platforms.

String collection always used ref32 to fetch the string pointer.  Make it
use gen_fetch instead.

As a side effect, this patch changes dup+const+trace+pop sequence used
for collecting the string's address to a trace_quick opcode.  This
results in a shorter agent expression.

This appeared to work on x86_64 since it's a little-endian platform, and
malloc (used in gdb.trace/collection.exp) returns addresses in low 4GB.
Noticed and tested on s390x-ibm-linux-gnu, also tested on
i686-unknown-linux-gnu and x86_64-unknown-linux-gnu.

gdb/ChangeLog:

* ax-gdb.c (gen_traced_pop): Use gen_fetch for string collection.
gdb/ChangeLog
gdb/ax-gdb.c
This page took 0.024692 seconds and 4 git commands to generate.