This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix ARM stepping over Thumb-mode "bx pc" or "blx pc"


Hi Joseph,

I'm not an ARM expert, but this looks fine to me.  Go ahead.

On 08/13/2012 05:30 PM, Joseph S. Myers wrote:

> +if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} $opts] {
> +    untested ${testfile}.exp

See <http://sourceware.org/gdb/wiki/GDBTestcaseCookbook>.

"In untested calls, please spell out the reason the test ends up untested, instead of just writing
 the test name, as with the latter we just end up with the test name duplicated in
 the gdb.sum output. For example: "

Something like:

  untested "Failed to compile $srcfile"

is sufficient.

> +    return -1
> +}
> +
> +if ![runto_main] then {
> +    untested ${testfile}.exp

  untested "could not run to main"

> +    return -1
> +}
> +
> +gdb_test "stepi" "0x\[0-9a-fA-F\]+ in main \\(\\)" "stepi for bx pc"

You can use dejagnu's $hex global instead of "0x\[0-9a-fA-F\]+" .

> +
> +gdb_test "x /i \$pc" \
> +    "0x\[0-9a-fA-F\]+ <main\\+4>:\[ \t\]+mov\[ \t\]+r0,\[ \t\]+#0.*" \
> +    "stepi reached correct instruction"
> 

Ditto.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]