This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix that different function breakpoints are set@same pc address (PR gdb/12703)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: yao at codesourcery dot com (Yao Qi)
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 10 Oct 2011 16:46:47 +0200 (CEST)
- Subject: Re: [PATCH] Fix that different function breakpoints are set@same pc address (PR gdb/12703)
Yao Qi wrote:
> gdb/
> * arm-tdep.c (thumb_analyze_prologue): Check condition for 32-bit
> Thumb-2 instructions.
Huh. That check is indeed wrong.
> - else if ((insn & 0xe000) == 0xe000)
> + else if ((insn & 0xe000) == 0xe000 && (insn & 0x1800) != 0)
> {
Instead of open-coding the check, I think it would be preferable to
use the thumb_insn_size routine instead.
Note that there are a number of other places that either already open-
code the correct check, or -worse- use the same incorrect check as the
code above:
- thumb_in_function_epilogue_p
- thumb_get_next_pc_raw
- arm_breakpoint_from_pc
Would you mind converting them all to thumb_insn_size?
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com