aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-03-15 16:33:04 +0000
committerPedro Alves <palves@redhat.com>2016-03-15 16:33:04 +0000
commit16b4184277c4ad5b4a20278060fd3f6259d1ed49 (patch)
tree7dabff235810866e3eaaa237b899bb0f2cc33c27 /gdb/infrun.c
parent2a60e18f8fe3bf9512671e02b39acacb484bb8c6 (diff)
downloadgdb-16b4184277c4ad5b4a20278060fd3f6259d1ed49.zip
gdb-16b4184277c4ad5b4a20278060fd3f6259d1ed49.tar.gz
gdb-16b4184277c4ad5b4a20278060fd3f6259d1ed49.tar.bz2
Fix PR gdb/19676: Disable displaced stepping if /proc not mounted
On GNU/Linux archs that support displaced stepping, if /proc is not mounted, GDB gets stuck not able to step past breakpoints: (gdb) c Continuing. dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2163 2163 LIBC_PROBE (init_complete, 2, LM_ID_BASE, r); Cannot find AT_ENTRY auxiliary vector entry. (gdb) c Continuing. dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>, auxv=<optimized out>) at rtld.c:2163 2163 LIBC_PROBE (init_complete, 2, LM_ID_BASE, r); Cannot find AT_ENTRY auxiliary vector entry. (gdb) That's because GDB can't figure out where the scratch pad is. This is a regression introduced by the earlier changes to make the Linux native target always work in non-stop mode. This commit makes GDB detect the case and fallback to stepping over breakpoints in-line. gdb/ChangeLog: 2016-03-15 Pedro Alves <palves@redhat.com> PR gdb/19676 * infrun.c (displaced_step_prepare): Also disable displaced stepping on NOT_SUPPORTED_ERROR. * linux-tdep.c (linux_displaced_step_location): If reading auxv fails, throw NOT_SUPPORTED_ERROR instead of generic error.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 3e8c9e0..696105d 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1894,7 +1894,8 @@ displaced_step_prepare (ptid_t ptid)
{
struct displaced_step_inferior_state *displaced_state;
- if (ex.error != MEMORY_ERROR)
+ if (ex.error != MEMORY_ERROR
+ && ex.error != NOT_SUPPORTED_ERROR)
throw_exception (ex);
if (debug_infrun)