Created attachment 13540
Proposed patch

I managed to get a working qemu setup without much efforts using
Buildroot, and I can reproduce the issue.  Although if there is a ready-
to-use Ubuntu image I can use, I'd be happy to use it (I just don't want
to go through the trouble of installing the distro in qemu with the
installer).

See the attached patch, it does fix the issue for me.

However, the inferior always hits this when running:

    Program received signal SIGSEGV, Segmentation fault.
    0x000003ffac312c6c in _dl_debug_initialize () from /lib/ld64.so.1

... and that was happening prior to my patches, and in GDB 10.  I guess
you don't see it?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1934505

Title:
  gdb 11 doesn't work on impish/s390x: internal-error:
  displaced_step_prepare_status linux_displaced_step_prepare(gdbarch*,
  thread_info*, CORE_ADDR&): Assertion
  `gdbarch_data->num_disp_step_buffers > 0' failed.

Status in gdb:
  Confirmed
Status in gdb package in Ubuntu:
  Confirmed

Bug description:
  gdb doesn't work on impish/s390x at the minute. Even if you say 'no'
  to both questions you still can't debug:

  ubuntu@laney-bos01-s390x-2:~/glib-networking-2.66.0/build$ gdb ls
  GNU gdb (Ubuntu 11.0.50.20210630-0ubuntu1) 11.0.50.20210630-git
  Copyright (C) 2021 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  Type "show copying" and "show warranty" for details.
  This GDB was configured as "s390x-linux-gnu".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <https://www.gnu.org/software/gdb/bugs/>.
  Find the GDB manual and other documentation resources online at:
      <http://www.gnu.org/software/gdb/documentation/>.

  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from ls...
  (No debugging symbols found in ls)
  (gdb) run
  Starting program: /usr/bin/ls
  /build/gdb-Ti35un/gdb-11.0.50.20210630/gdb/linux-tdep.c:2550: internal-error: 
displaced_step_prepare_status linux_displaced_step_prepare(gdbarch*, 
thread_info*, CORE_ADDR&): Assertion `gdbarch_data->num_disp_step_buffers > 0' 
failed.
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.
  Quit this debugging session? (y or n) n

  This is a bug, please report it.  For instructions, see:
  <https://www.gnu.org/software/gdb/bugs/>.

  /build/gdb-Ti35un/gdb-11.0.50.20210630/gdb/linux-tdep.c:2550: internal-error: 
displaced_step_prepare_status linux_displaced_step_prepare(gdbarch*, 
thread_info*, CORE_ADDR&): Assertion `gdbarch_data->num_disp_step_buffers > 0' 
failed.
  A problem internal to GDB has been detected,
  further debugging may prove unreliable.
  Create a core file of GDB? (y or n) n
  Command aborted.
  (gdb)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gdb/+bug/1934505/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to