This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] Remove arm_override_mode
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 23 Jun 2016 14:20:22 +0100
- Subject: Re: [PATCH 1/4] Remove arm_override_mode
- Authentication-results: sourceware.org; auth=none
- References: <1463069912-23472-1-git-send-email-yao dot qi at linaro dot org> <1463069912-23472-2-git-send-email-yao dot qi at linaro dot org>
On 05/12/2016 05:18 PM, Yao Qi wrote:
> This patch removes global variable arm_override_mode. The rationale is
> that if the address is the next address of current pc, we can get the
> thumb/arm mode from dest address computed by software single step code.
>
If we're still doing something special inside arm_pc_is_thumb
for a particular caller, how's this better than the global?
It looks way more complicated, and fragile. It looks like the sort
of thing that could break easily, since the function now
behaves differently depending on the currently select thread. :-/
I liked the plan of going the gdbserver direction of storing the
breakpoint's "len/kind" in the breakpoint location, as a
separate field, instead of encoding it in the address. Did you
find a problem with that approach?
Thanks,
Pedro Alves