aboutsummaryrefslogtreecommitdiff
path: root/readline/macro.c
diff options
context:
space:
mode:
authorPedro Franco de Carvalho <pedromfc@linux.ibm.com>2018-08-06 16:24:55 -0300
committerPedro Franco de Carvalho <pedromfc@linux.ibm.com>2018-08-06 16:36:36 -0300
commit4277c4b87addb5354cc47b98d7a73e44cfaf22c2 (patch)
treef727f73fc3f704752b1d6614d382a6070ca72bf3 /readline/macro.c
parent3df3a985a475db004706d64f83d9085f99053611 (diff)
downloadgdb-4277c4b87addb5354cc47b98d7a73e44cfaf22c2.zip
gdb-4277c4b87addb5354cc47b98d7a73e44cfaf22c2.tar.gz
gdb-4277c4b87addb5354cc47b98d7a73e44cfaf22c2.tar.bz2
Use remote register numbers in tracepoint mask
Currently, tracepoint register masks in the QTDP packets include both internal and remote register numbers, as well as pseudo-register numbers. This patch changes this so that the mask only includes remote register numbers. Register numbers from agent expressions are already set in the mask using remote numbers. Other tracepoint actions used internal numbers, e.g. "collect $regs" or "collect $<pseudoreg>". To handle pseudoreg numbers, an empty agent expression is created and ax_reg_mask is called for this expression and the pseudoreg. This will cause the ax to set its mask with the corresponding remote raw register numbers (using ax_regs_mask, which calls gdbarch_ax_pseudo_register_collect). If ax_regs_mask and gdbarch_ax_pseudo_register_collect also generate more ax bytecode, the ax is also appended to the collection list. It isn't clear that this was the original intent for gdbarch_ax_pseudo_register_collect, and none of the arches seem to do this, but if this changes in the future, it should work. The patch also refactors the code used by validate_action line to validate axs into a function that is now called from every place that generates axs. Previously, some parts of tracepoint.c that generated axs didn't check if the ax length was greater than MAX_AGENT_EXPR_LEN. gdb/ChangeLog: 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com> * tracepoint.h (class collection_list) <add_register>: Remove. <add_remote_register, add_ax_registers, add_local_register>: Declare. <add_memrange>: Add scope parameter. * tracepoint.c (encode_actions_1): Likewise. (collection_list::add_register): Rename to ... (collection_list::add_remote_register): ... this. Update comment. (collection_list::add_ax_registers, add_local_register): New methods. (collection_list::add_memrange): Add scope parameter. Call add_local_register instead of add_register. (finalize_tracepoint_aexpr): New function. (collection_list::collect_symbol): Update calls to add_memrange. Call add_local_register instead of add_register. Call add_ax_registers. Call finalize_tracepoint_aexpr. (encode_actions_1): Get remote regnos for $reg action. Call add_remote_register, add_ax_registers, and add_local_register. Update call to add_memrange. Call finalize_tracepoint_aexpr. (validate_actionline): Call finalize_tracepoint_aexpr.
Diffstat (limited to 'readline/macro.c')
0 files changed, 0 insertions, 0 deletions