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.