Bug 18605 - single step over ARM Cortex 'udiv' instruction
Summary: single step over ARM Cortex 'udiv' instruction
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: tdep (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 7.10
Assignee: Yao Qi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-26 08:58 UTC by Mikhail I. Krivtsov
Modified: 2015-06-30 08:47 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments
test case (196 bytes, text/plain)
2015-06-26 08:59 UTC, Mikhail I. Krivtsov
Details
test case log (1.49 KB, text/plain)
2015-06-26 09:00 UTC, Mikhail I. Krivtsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail I. Krivtsov 2015-06-26 08:58:10 UTC
While hunting for bug in application on ARM development board I met strange GDB behavior - it fails to single step over 'udiv' instruction complaining about memory access failure:

> Cannot access memory at address 0xffffffd3
Comment 1 Mikhail I. Krivtsov 2015-06-26 08:59:59 UTC
Created attachment 8395 [details]
test case

armv7l-tizen-linux-gnueabi-gcc -O0 -Wall -Wextra -o udiv-test udiv-test.c -save-temps -g
Comment 2 Mikhail I. Krivtsov 2015-06-26 09:00:45 UTC
Created attachment 8396 [details]
test case log
Comment 3 Yao Qi 2015-06-26 14:52:31 UTC
GDB doesn't handle this instruction correctly during software single step.  I'll take a look.
Comment 4 Yao Qi 2015-06-29 16:33:51 UTC
Patch is posted here https://sourceware.org/ml/gdb-patches/2015-06/msg00610.html
Comment 5 Sourceware Commits 2015-06-30 08:26:02 UTC
The master branch has been updated by Yao Qi <qiyao@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b9be803fed8f500b512d5685773c84fffcdf63f

commit 7b9be803fed8f500b512d5685773c84fffcdf63f
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Jun 30 09:24:43 2015 +0100

    Handle media instructions in arm software single step.
    
    This patch fixes PR 18605 which is about incorrectly decoding media
    instructions in software single step.
    
    gdb:
    
    2015-06-30  Yao Qi  <yao.qi@linaro.org>
    
    	PR tdep/18605
    	* arm-tdep.c (arm_get_next_pc_raw): Break for media
    	instructions.
Comment 6 Yao Qi 2015-06-30 08:47:43 UTC
Patch is pushed in.  Close this bug.